Browse Source

[hotfix] 修复容器中仍有几率因生命周期,getCadThread = 0导致线程池创建失败问题

pull/210/head
lujiaming 1 year ago
parent
commit
1671fc3572
  1. 4
      server/src/main/java/cn/keking/config/ConfigConstants.java
  2. 2
      server/src/main/java/cn/keking/service/FileHandlerService.java

4
server/src/main/java/cn/keking/config/ConfigConstants.java

@ -13,9 +13,9 @@ import java.util.concurrent.CopyOnWriteArraySet;
* @author: chenjh
* @since: 2019/4/10 17:22
*/
@Component
@Component(value = ConfigConstants.BEAN_NAME)
public class ConfigConstants {
public static final String BEAN_NAME = "configConstants";
static {
//pdfbox兼容低版本jdk
System.setProperty("sun.java2d.cmm", "sun.java2d.cmm.kcms.KcmsServiceProvider");

2
server/src/main/java/cn/keking/service/FileHandlerService.java

@ -27,6 +27,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
@ -49,6 +50,7 @@ import java.util.stream.IntStream;
* @date 2017/11/13
*/
@Component
@DependsOn(ConfigConstants.BEAN_NAME)
public class FileHandlerService implements InitializingBean {
private static final String PDF2JPG_IMAGE_FORMAT = ".jpg";

Loading…
Cancel
Save