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

pull/210/head
lujiaming 1 year ago
parent e550df3e8b
commit 1671fc3572

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

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

Loading…
Cancel
Save