mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix bug
This commit is contained in:
parent
24cee9d2c1
commit
61252da8cb
@ -13,6 +13,7 @@
|
||||
package org.dromara.hutool.crypto.provider;
|
||||
|
||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
|
||||
import java.security.Provider;
|
||||
import java.security.Security;
|
||||
@ -25,6 +26,14 @@ import java.security.Security;
|
||||
*/
|
||||
public class BouncyCastleProviderFactory implements ProviderFactory {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*/
|
||||
public BouncyCastleProviderFactory(){
|
||||
// SPI方式加载时检查BC库是否引入
|
||||
Assert.notNull(BouncyCastleProvider.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Provider create() {
|
||||
// pr#3464,Graalvm打包后注册会导致
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.extra.aop.engine.spring;
|
||||
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.core.reflect.ClassUtil;
|
||||
import org.dromara.hutool.core.reflect.ConstructorUtil;
|
||||
import org.dromara.hutool.extra.aop.Aspect;
|
||||
@ -27,6 +28,14 @@ import java.lang.reflect.Constructor;
|
||||
*/
|
||||
public class SpringCglibProxyEngine implements ProxyEngine {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*/
|
||||
public SpringCglibProxyEngine(){
|
||||
// SPI方式加载时检查BC库是否引入
|
||||
Assert.notNull(Enhancer.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T proxy(final T target, final Aspect aspect) {
|
||||
final Class<?> targetClass = target.getClass();
|
||||
|
@ -13,6 +13,7 @@
|
||||
package org.dromara.hutool.extra.template.engine.beetl;
|
||||
|
||||
import org.dromara.hutool.core.io.IORuntimeException;
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.extra.template.Template;
|
||||
import org.dromara.hutool.extra.template.TemplateConfig;
|
||||
import org.dromara.hutool.extra.template.engine.TemplateEngine;
|
||||
@ -40,7 +41,10 @@ public class BeetlEngine implements TemplateEngine {
|
||||
/**
|
||||
* 默认构造
|
||||
*/
|
||||
public BeetlEngine() {}
|
||||
public BeetlEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(GroupTemplate.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造
|
||||
|
@ -14,6 +14,7 @@ package org.dromara.hutool.extra.template.engine.enjoy;
|
||||
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
import org.dromara.hutool.core.data.id.IdUtil;
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.core.util.ObjUtil;
|
||||
import org.dromara.hutool.extra.template.Template;
|
||||
import org.dromara.hutool.extra.template.TemplateConfig;
|
||||
@ -39,7 +40,10 @@ public class EnjoyEngine implements TemplateEngine {
|
||||
/**
|
||||
* 默认构造
|
||||
*/
|
||||
public EnjoyEngine() {}
|
||||
public EnjoyEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(com.jfinal.template.Engine.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造
|
||||
|
@ -15,6 +15,7 @@ package org.dromara.hutool.extra.template.engine.freemarker;
|
||||
import org.dromara.hutool.core.classloader.ClassLoaderUtil;
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
import org.dromara.hutool.core.io.IORuntimeException;
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.extra.template.Template;
|
||||
import org.dromara.hutool.extra.template.TemplateConfig;
|
||||
import org.dromara.hutool.extra.template.engine.TemplateEngine;
|
||||
@ -41,6 +42,8 @@ public class FreemarkerEngine implements TemplateEngine {
|
||||
* 默认构造
|
||||
*/
|
||||
public FreemarkerEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(Configuration.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.extra.template.engine.jetbrick;
|
||||
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.extra.template.Template;
|
||||
import org.dromara.hutool.extra.template.TemplateConfig;
|
||||
import org.dromara.hutool.extra.template.engine.TemplateEngine;
|
||||
@ -34,7 +35,10 @@ public class JetbrickEngine implements TemplateEngine {
|
||||
/**
|
||||
* 默认构造
|
||||
*/
|
||||
public JetbrickEngine() {}
|
||||
public JetbrickEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(JetbrickEngine.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造
|
||||
|
@ -16,6 +16,7 @@ import gg.jte.CodeResolver;
|
||||
import gg.jte.ContentType;
|
||||
import gg.jte.resolve.DirectoryCodeResolver;
|
||||
import gg.jte.resolve.ResourceCodeResolver;
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.core.map.MapUtil;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.dromara.hutool.extra.template.Template;
|
||||
@ -42,6 +43,8 @@ public class JteEngine implements TemplateEngine {
|
||||
* 默认构造
|
||||
*/
|
||||
public JteEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(gg.jte.TemplateEngine.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -14,6 +14,7 @@ package org.dromara.hutool.extra.template.engine.pebble;
|
||||
|
||||
import org.dromara.hutool.core.collection.ListUtil;
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.dromara.hutool.extra.template.Template;
|
||||
import org.dromara.hutool.extra.template.TemplateConfig;
|
||||
@ -35,6 +36,8 @@ public class PebbleTemplateEngine implements TemplateEngine {
|
||||
* 构造,不初始化
|
||||
*/
|
||||
public PebbleTemplateEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(PebbleEngine.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.extra.template.engine.rythm;
|
||||
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.extra.template.Template;
|
||||
import org.dromara.hutool.extra.template.TemplateConfig;
|
||||
import org.dromara.hutool.extra.template.engine.TemplateEngine;
|
||||
@ -27,13 +28,16 @@ import java.util.Properties;
|
||||
*/
|
||||
public class RythmEngine implements TemplateEngine {
|
||||
|
||||
org.rythmengine.RythmEngine engine;
|
||||
private org.rythmengine.RythmEngine engine;
|
||||
|
||||
// --------------------------------------------------------------------------------- Constructor start
|
||||
/**
|
||||
* 默认构造
|
||||
*/
|
||||
public RythmEngine() {}
|
||||
public RythmEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(org.rythmengine.RythmEngine.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.extra.template.engine.thymeleaf;
|
||||
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.thymeleaf.templatemode.TemplateMode;
|
||||
import org.thymeleaf.templateresolver.ClassLoaderTemplateResolver;
|
||||
import org.thymeleaf.templateresolver.DefaultTemplateResolver;
|
||||
@ -42,6 +43,8 @@ public class ThymeleafEngine implements TemplateEngine {
|
||||
* 默认构造
|
||||
*/
|
||||
public ThymeleafEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(org.thymeleaf.TemplateEngine.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
package org.dromara.hutool.extra.template.engine.velocity;
|
||||
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
import org.dromara.hutool.core.util.ObjUtil;
|
||||
import org.dromara.hutool.extra.template.Template;
|
||||
@ -36,6 +37,8 @@ public class VelocityEngine implements TemplateEngine {
|
||||
* 默认构造
|
||||
*/
|
||||
public VelocityEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(org.apache.velocity.app.VelocityEngine.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -13,6 +13,7 @@
|
||||
package org.dromara.hutool.extra.template.engine.wit;
|
||||
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.core.map.Dict;
|
||||
import org.dromara.hutool.extra.template.Template;
|
||||
import org.dromara.hutool.extra.template.TemplateConfig;
|
||||
@ -37,7 +38,10 @@ public class WitEngine implements TemplateEngine {
|
||||
/**
|
||||
* 默认构造
|
||||
*/
|
||||
public WitEngine() {}
|
||||
public WitEngine() {
|
||||
// SPI方式加载时检查库是否引入
|
||||
Assert.notNull(Engine.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构造
|
||||
|
Loading…
x
Reference in New Issue
Block a user