diff --git a/basic-util/pom.xml b/basic-util/pom.xml index 0ba57136..868659c8 100644 --- a/basic-util/pom.xml +++ b/basic-util/pom.xml @@ -122,11 +122,18 @@ - dom4j + org.dom4j dom4j + + + org.jsoup + jsoup + + + org.apache.httpcomponents @@ -147,6 +154,7 @@ 1.0-SNAPSHOT + \ No newline at end of file diff --git a/common/src/main/java/ink/wgink/common/service/api/impl/ApiInfoServiceImpl.java b/common/src/main/java/ink/wgink/common/service/api/impl/ApiInfoServiceImpl.java index d2699a08..e1a7a900 100644 --- a/common/src/main/java/ink/wgink/common/service/api/impl/ApiInfoServiceImpl.java +++ b/common/src/main/java/ink/wgink/common/service/api/impl/ApiInfoServiceImpl.java @@ -22,11 +22,11 @@ import io.swagger.models.properties.RefProperty; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; import springfox.documentation.service.Documentation; import springfox.documentation.spring.web.DocumentationCache; import springfox.documentation.swagger2.mappers.ServiceModelToSwagger2Mapper; +import javax.annotation.PostConstruct; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.BufferedWriter; @@ -57,8 +57,12 @@ public class ApiInfoServiceImpl extends DefaultBaseService implements IApiInfoSe private ServiceModelToSwagger2Mapper serviceModelToSwagger2Mapper; @Autowired private ServerProperties serverProperties; - @Autowired - private FreeMarkerConfigurer freeMarkerConfigurer; + private Configuration configuration = new Configuration(Configuration.getVersion()); + + @PostConstruct + private void init() { + configuration.setClassForTemplateLoading(ApiInfoServiceImpl.class, "/templates"); + } @Override public SystemApiDTO getSystemApi(String group, String apiType, HttpServletRequest request) { @@ -476,14 +480,8 @@ public class ApiInfoServiceImpl extends DefaultBaseService implements IApiInfoSe return subRefProperty; } - private Configuration getConfiguration() { - Configuration configuration = freeMarkerConfigurer.getConfiguration(); - configuration.setClassForTemplateLoading(ApiInfoServiceImpl.class, "/templates"); - return configuration; - } - private Template getTemplate(String fileName) throws IOException { - return getConfiguration().getTemplate(fileName, ISystemConstant.CHARSET_UTF8); + return configuration.getTemplate(fileName, ISystemConstant.CHARSET_UTF8); } } diff --git a/pom.xml b/pom.xml index 428fe157..6f9e280f 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ 5.1.47 1.1.9 5.1.1 - 1.6.1 + 2.1.3 2.3.0 2.10.4 3.1.0 @@ -100,6 +100,7 @@ 2.5.5 2.3.31 2.8.5 + 1.14.3 @@ -238,7 +239,7 @@ - dom4j + org.dom4j dom4j ${dom4j.version} @@ -556,6 +557,14 @@ ${gson.version} + + + + org.jsoup + jsoup + ${jsoup.version} + + diff --git a/redis-cache/pom.xml b/redis-cache/pom.xml index 84bf9af8..3bc8edc4 100644 --- a/redis-cache/pom.xml +++ b/redis-cache/pom.xml @@ -26,6 +26,12 @@ + + ink.wgink + common + 1.0-SNAPSHOT + + ink.wgink basic-exception