parent
57490e76ab
commit
8fa20f37f1
@ -0,0 +1,50 @@ |
|||||||
|
package com.unionmed.framework.crypto; |
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.apache.commons.codec.binary.Base64; |
||||||
|
|
||||||
|
import javax.crypto.Cipher; |
||||||
|
import javax.crypto.spec.IvParameterSpec; |
||||||
|
import javax.crypto.spec.SecretKeySpec; |
||||||
|
import java.io.UnsupportedEncodingException; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ianChen |
||||||
|
* @date 2023/6/21 11:45 |
||||||
|
*/ |
||||||
|
@Slf4j |
||||||
|
public class AES { |
||||||
|
|
||||||
|
private static final String ALGORITHM = "AES"; |
||||||
|
private static final String PADDING = "AES/CBC/ISO10126Padding"; // AES/CBC/PKCS5PADDING
|
||||||
|
|
||||||
|
private static byte[] toUtf8Bytes(String s) throws UnsupportedEncodingException { |
||||||
|
return s.getBytes("UTF-8"); |
||||||
|
} |
||||||
|
|
||||||
|
public static String encrypt(String sk, String iv, String value) { |
||||||
|
try { |
||||||
|
IvParameterSpec ivSpec = new IvParameterSpec(toUtf8Bytes(iv)); |
||||||
|
SecretKeySpec skSpec = new SecretKeySpec(toUtf8Bytes(sk), ALGORITHM); |
||||||
|
Cipher cipher = Cipher.getInstance(PADDING); |
||||||
|
cipher.init(Cipher.ENCRYPT_MODE, skSpec, ivSpec); |
||||||
|
return Base64.encodeBase64String(cipher.doFinal(value.getBytes())); |
||||||
|
} catch (Exception ex) { |
||||||
|
log.error("AES加密失败", ex); |
||||||
|
return null; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
public static String decrypt(String sk, String iv, String val) { |
||||||
|
try { |
||||||
|
IvParameterSpec ivSpec = new IvParameterSpec(toUtf8Bytes(iv)); |
||||||
|
SecretKeySpec skSpec = new SecretKeySpec(toUtf8Bytes(sk), ALGORITHM); |
||||||
|
Cipher cipher = Cipher.getInstance(PADDING); |
||||||
|
cipher.init(Cipher.DECRYPT_MODE, skSpec, ivSpec); |
||||||
|
return new String(cipher.doFinal(Base64.decodeBase64(val))); |
||||||
|
} catch (Exception ex) { |
||||||
|
log.error("AES解密失败", ex); |
||||||
|
return null; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -1,64 +0,0 @@ |
|||||||
package com.unionmed.framework.spring.mvc; |
|
||||||
|
|
||||||
import com.unionmed.framework.http.HttpHeaders; |
|
||||||
import com.unionmed.framework.spring.mvc.annotation.ResponsePrototype; |
|
||||||
import com.unionmed.framework.spring.mvc.datatemplate.DataTemplate; |
|
||||||
import com.unionmed.framework.spring.mvc.datatemplate.DataTemplates; |
|
||||||
import com.unionmed.framework.util.ObjectUtils; |
|
||||||
import com.unionmed.framework.spring.mvc.BaseReturn; |
|
||||||
import org.springframework.core.MethodParameter; |
|
||||||
import org.springframework.http.converter.HttpMessageConverter; |
|
||||||
import org.springframework.http.converter.HttpMessageNotWritableException; |
|
||||||
import org.springframework.web.HttpMediaTypeNotAcceptableException; |
|
||||||
import org.springframework.web.context.request.NativeWebRequest; |
|
||||||
import org.springframework.web.method.support.ModelAndViewContainer; |
|
||||||
import org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor; |
|
||||||
|
|
||||||
import java.io.IOException; |
|
||||||
import java.util.List; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author ianChen |
|
||||||
* @date 2022/12/16 10:49 |
|
||||||
*/ |
|
||||||
public class ResponseBodyProcessor extends RequestResponseBodyMethodProcessor { |
|
||||||
|
|
||||||
public ResponseBodyProcessor(List<HttpMessageConverter<?>> converters) { |
|
||||||
super(converters); |
|
||||||
} |
|
||||||
|
|
||||||
private Object handleValue(Object returnValue, NativeWebRequest webRequest) { |
|
||||||
String dataTemplateName = webRequest.getHeader(HttpHeaders.X_DATA_TEMPLATE); |
|
||||||
if (ObjectUtils.isEmpty(dataTemplateName)) |
|
||||||
return returnValue; |
|
||||||
|
|
||||||
DataTemplate dataTemplate = DataTemplates.get(dataTemplateName); |
|
||||||
if (null == dataTemplate) |
|
||||||
return returnValue; |
|
||||||
|
|
||||||
return dataTemplate.handle(returnValue); |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws IOException, HttpMediaTypeNotAcceptableException, HttpMessageNotWritableException { |
|
||||||
if (!hasResponsePrototype(returnType)) { |
|
||||||
if (returnValue == null) { |
|
||||||
returnValue = BaseReturn.suc(); |
|
||||||
} else if (!(returnValue instanceof BaseReturn)) { |
|
||||||
returnValue = BaseReturn.suc(returnValue); |
|
||||||
} |
|
||||||
|
|
||||||
returnValue = handleValue(returnValue, webRequest); |
|
||||||
} |
|
||||||
super.handleReturnValue(returnValue, returnType, mavContainer, webRequest); |
|
||||||
} |
|
||||||
|
|
||||||
private boolean hasResponsePrototype(MethodParameter returnType) { |
|
||||||
return returnType.getAnnotatedElement().getAnnotation(ResponsePrototype.class) != null; |
|
||||||
} |
|
||||||
|
|
||||||
@Override |
|
||||||
public boolean supportsReturnType(MethodParameter returnType) { |
|
||||||
return returnType.getDeclaringClass().getName().startsWith("com.unionmed"); |
|
||||||
} |
|
||||||
} |
|
@ -1,8 +0,0 @@ |
|||||||
package com.unionmed.framework.spring.mvc; |
|
||||||
|
|
||||||
/** |
|
||||||
* @author ianChen |
|
||||||
* @date 2022/12/16 16:23 |
|
||||||
*/ |
|
||||||
public interface ResponseTemplate { |
|
||||||
} |
|
@ -0,0 +1,37 @@ |
|||||||
|
package com.unionmed.framework.spring.mvc.response; |
||||||
|
|
||||||
|
import org.springframework.core.MethodParameter; |
||||||
|
import org.springframework.http.converter.HttpMessageConverter; |
||||||
|
import org.springframework.http.converter.HttpMessageNotWritableException; |
||||||
|
import org.springframework.web.HttpMediaTypeNotAcceptableException; |
||||||
|
import org.springframework.web.context.request.NativeWebRequest; |
||||||
|
import org.springframework.web.method.support.ModelAndViewContainer; |
||||||
|
import org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor; |
||||||
|
|
||||||
|
import java.io.IOException; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ianChen |
||||||
|
* @date 2022/12/16 10:49 |
||||||
|
*/ |
||||||
|
public class ResponseBodyProcessor extends RequestResponseBodyMethodProcessor { |
||||||
|
|
||||||
|
private final ResponseBodyProcessorChain responseBodyProcessorChain; |
||||||
|
|
||||||
|
public ResponseBodyProcessor(List<HttpMessageConverter<?>> converters, ResponseBodyProcessorChain responseBodyProcessorChain) { |
||||||
|
super(converters); |
||||||
|
this.responseBodyProcessorChain = responseBodyProcessorChain; |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws IOException, HttpMediaTypeNotAcceptableException, HttpMessageNotWritableException { |
||||||
|
returnValue = responseBodyProcessorChain.handler(returnValue, returnType, mavContainer, webRequest); |
||||||
|
super.handleReturnValue(returnValue, returnType, mavContainer, webRequest); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public boolean supportsReturnType(MethodParameter returnType) { |
||||||
|
return returnType.getDeclaringClass().getName().startsWith("com.unionmed"); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,43 @@ |
|||||||
|
package com.unionmed.framework.spring.mvc.response; |
||||||
|
|
||||||
|
import com.unionmed.framework.spring.mvc.response.interceptor.ResponseBodyInterceptor; |
||||||
|
import com.unionmed.framework.util.ObjectUtils; |
||||||
|
import org.springframework.core.MethodParameter; |
||||||
|
import org.springframework.web.context.request.NativeWebRequest; |
||||||
|
import org.springframework.web.method.support.ModelAndViewContainer; |
||||||
|
|
||||||
|
import java.util.ArrayList; |
||||||
|
import java.util.Collections; |
||||||
|
import java.util.Comparator; |
||||||
|
import java.util.List; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ianChen |
||||||
|
* @date 2023/6/25 15:10 |
||||||
|
*/ |
||||||
|
public class ResponseBodyProcessorChain { |
||||||
|
|
||||||
|
private List<ResponseBodyInterceptor> interceptors = new ArrayList<>(0); |
||||||
|
|
||||||
|
public Object handler(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) { |
||||||
|
if (ObjectUtils.notEmpty(interceptors)) { |
||||||
|
for (ResponseBodyInterceptor interceptor : interceptors) { |
||||||
|
returnValue = interceptor.handleReturnValue(returnValue, returnType, mavContainer, webRequest); |
||||||
|
} |
||||||
|
} |
||||||
|
return returnValue; |
||||||
|
} |
||||||
|
|
||||||
|
public boolean add(ResponseBodyInterceptor... interceptors) { |
||||||
|
if (ObjectUtils.isEmpty(interceptors)) return false; |
||||||
|
|
||||||
|
for (ResponseBodyInterceptor interceptor : interceptors) { |
||||||
|
if (interceptor != null) { |
||||||
|
this.interceptors.add(interceptor); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
Collections.sort(this.interceptors, Comparator.comparingInt(ResponseBodyInterceptor::getOrder)); |
||||||
|
return true; |
||||||
|
} |
||||||
|
} |
@ -1,4 +1,4 @@ |
|||||||
package com.unionmed.framework.spring.mvc.datatemplate; |
package com.unionmed.framework.spring.mvc.response.datatemplate; |
||||||
|
|
||||||
/** |
/** |
||||||
* @author ianChen |
* @author ianChen |
@ -0,0 +1,42 @@ |
|||||||
|
package com.unionmed.framework.spring.mvc.response.datatemplate; |
||||||
|
|
||||||
|
import com.unionmed.framework.http.HttpHeaders; |
||||||
|
import com.unionmed.framework.spring.mvc.BaseReturn; |
||||||
|
import com.unionmed.framework.spring.mvc.annotation.ResponsePrototype; |
||||||
|
import com.unionmed.framework.spring.mvc.response.interceptor.ResponseBodyInterceptor; |
||||||
|
import com.unionmed.framework.util.ObjectUtils; |
||||||
|
import org.springframework.core.MethodParameter; |
||||||
|
import org.springframework.core.annotation.Order; |
||||||
|
import org.springframework.web.context.request.NativeWebRequest; |
||||||
|
import org.springframework.web.method.support.ModelAndViewContainer; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ianChen |
||||||
|
* @date 2023/6/25 10:29 |
||||||
|
*/ |
||||||
|
public class DataTemplateResponseBodyInterceptor implements ResponseBodyInterceptor { |
||||||
|
|
||||||
|
@Override |
||||||
|
public Object handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) { |
||||||
|
if (returnType.getAnnotatedElement().getAnnotation(ResponsePrototype.class) != null) |
||||||
|
return returnValue; |
||||||
|
|
||||||
|
if (returnValue == null) { |
||||||
|
returnValue = BaseReturn.suc(); |
||||||
|
} else if (!BaseReturn.class.isAssignableFrom(returnValue.getClass())) { |
||||||
|
returnValue = BaseReturn.suc(returnValue); |
||||||
|
} |
||||||
|
|
||||||
|
String dataTemplate = webRequest.getHeader(HttpHeaders.X_DATA_TEMPLATE); |
||||||
|
if (ObjectUtils.isEmpty(dataTemplate)) |
||||||
|
return returnValue; |
||||||
|
|
||||||
|
DataTemplate template = DataTemplates.get(dataTemplate); |
||||||
|
return null == template ? returnValue : template.handle(returnValue); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public int getOrder() { |
||||||
|
return 9; |
||||||
|
} |
||||||
|
} |
@ -1,4 +1,4 @@ |
|||||||
package com.unionmed.framework.spring.mvc.datatemplate; |
package com.unionmed.framework.spring.mvc.response.datatemplate; |
||||||
|
|
||||||
import com.unionmed.framework.bean.BeanFactory; |
import com.unionmed.framework.bean.BeanFactory; |
||||||
import com.unionmed.framework.util.ObjectUtils; |
import com.unionmed.framework.util.ObjectUtils; |
@ -1,4 +1,4 @@ |
|||||||
package com.unionmed.framework.spring.mvc.datatemplate; |
package com.unionmed.framework.spring.mvc.response.datatemplate; |
||||||
|
|
||||||
import com.unionmed.framework.spring.mvc.BaseReturn; |
import com.unionmed.framework.spring.mvc.BaseReturn; |
||||||
import org.springframework.stereotype.Component; |
import org.springframework.stereotype.Component; |
@ -0,0 +1,88 @@ |
|||||||
|
package com.unionmed.framework.spring.mvc.response.interceptor; |
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil; |
||||||
|
import com.alibaba.fastjson.JSON; |
||||||
|
import com.alibaba.fastjson.JSONObject; |
||||||
|
import com.unionmed.framework.crypto.AES; |
||||||
|
import com.unionmed.framework.http.HttpHeaders; |
||||||
|
import com.unionmed.framework.spring.mvc.BaseReturn; |
||||||
|
import com.unionmed.framework.spring.mvc.BaseReturnUtils; |
||||||
|
import com.unionmed.framework.util.Generators; |
||||||
|
import com.unionmed.framework.util.ObjectUtils; |
||||||
|
import org.springframework.core.MethodParameter; |
||||||
|
import org.springframework.core.env.Environment; |
||||||
|
import org.springframework.web.context.request.NativeWebRequest; |
||||||
|
import org.springframework.web.method.support.ModelAndViewContainer; |
||||||
|
|
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* 加密拦截 |
||||||
|
* |
||||||
|
* @author ianChen |
||||||
|
* @date 2023/6/25 10:33 |
||||||
|
*/ |
||||||
|
public class EncryptionResponseBodyInterceptor implements ResponseBodyInterceptor { |
||||||
|
|
||||||
|
private final Environment environment; |
||||||
|
private final String RESOURCE_PREFIX = "unionmed.web.response.body.crypt.aes"; |
||||||
|
private final String SK_KEY = RESOURCE_PREFIX + ".sk"; |
||||||
|
private final String ENABLED_KEY = RESOURCE_PREFIX + ".enabled"; |
||||||
|
private final boolean enabled; |
||||||
|
private final String sk; |
||||||
|
|
||||||
|
public EncryptionResponseBodyInterceptor(Environment environment) { |
||||||
|
this.environment = environment; |
||||||
|
if (ObjectUtils.equalsIgnore(environment.getProperty(ENABLED_KEY), "true")) { |
||||||
|
this.sk = environment.getProperty(SK_KEY); |
||||||
|
if (ObjectUtils.isEmpty(sk)) |
||||||
|
throw new NullPointerException("AES SecretKey is empty"); |
||||||
|
this.enabled = true; |
||||||
|
} else { |
||||||
|
this.enabled = false; |
||||||
|
this.sk = null; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public Object handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) { |
||||||
|
if (!this.enabled || returnValue == null) return null; |
||||||
|
|
||||||
|
String value = webRequest.getHeader(HttpHeaders.X_DATA_CRYPT_E); |
||||||
|
if (ObjectUtils.equalsIgnore(value, HttpHeaders.X_DATA_CRYPT_E_VALUE_TRUE)) { |
||||||
|
returnValue = handleReturnValue(sk, Generators.randomMix(16), returnValue); |
||||||
|
} |
||||||
|
|
||||||
|
return returnValue; |
||||||
|
} |
||||||
|
|
||||||
|
private Object handleReturnValue(String sk, String iv, Object returnValue) { |
||||||
|
if (returnValue instanceof BaseReturn) { |
||||||
|
BaseReturn br = (BaseReturn) returnValue; |
||||||
|
if (br.getData() != null) { |
||||||
|
br.setData(handleReturnValue(sk, iv, br.getData())); |
||||||
|
return returnValue; |
||||||
|
} |
||||||
|
} else if (returnValue instanceof String) { |
||||||
|
String str = (String) returnValue; |
||||||
|
if (JSONUtil.isJsonObj(str)) { |
||||||
|
return handleReturnValue(sk, iv, JSONObject.parseObject(str)); |
||||||
|
} |
||||||
|
} else if (returnValue instanceof JSONObject) { |
||||||
|
JSONObject jObject = (JSONObject) returnValue; |
||||||
|
if (BaseReturnUtils.isBaseReturnFormat(jObject)) { |
||||||
|
jObject.put("data", handleReturnValue(sk, iv, jObject.get("data"))); |
||||||
|
return jObject; |
||||||
|
} |
||||||
|
} else if (returnValue instanceof Map) { |
||||||
|
return handleReturnValue(sk, iv, new JSONObject((Map<String, Object>) returnValue)); |
||||||
|
} |
||||||
|
|
||||||
|
return iv + AES.encrypt(sk, iv, JSON.toJSONString(returnValue)); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public int getOrder() { |
||||||
|
return 8; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
package com.unionmed.framework.spring.mvc.response.interceptor; |
||||||
|
|
||||||
|
import org.springframework.core.MethodParameter; |
||||||
|
import org.springframework.core.Ordered; |
||||||
|
import org.springframework.web.context.request.NativeWebRequest; |
||||||
|
import org.springframework.web.method.support.ModelAndViewContainer; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author ianChen |
||||||
|
* @date 2023/6/25 10:27 |
||||||
|
*/ |
||||||
|
public interface ResponseBodyInterceptor extends Ordered { |
||||||
|
|
||||||
|
/** |
||||||
|
* @param returnValue |
||||||
|
* @param returnType |
||||||
|
* @param mavContainer |
||||||
|
* @param webRequest |
||||||
|
* @return |
||||||
|
*/ |
||||||
|
Object handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest); |
||||||
|
|
||||||
|
@Override |
||||||
|
default int getOrder() { |
||||||
|
return 10; |
||||||
|
} |
||||||
|
} |
@ -1,278 +1,263 @@ |
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||||
<parent> |
<parent> |
||||||
<groupId>org.springframework.boot</groupId> |
<groupId>org.springframework.boot</groupId> |
||||||
<artifactId>spring-boot-starter-parent</artifactId> |
<artifactId>spring-boot-starter-parent</artifactId> |
||||||
<version>2.3.4.RELEASE</version> |
<version>2.3.4.RELEASE</version> |
||||||
</parent> |
</parent> |
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion> |
<modelVersion>4.0.0</modelVersion> |
||||||
<groupId>com.unionmed</groupId> |
<groupId>com.unionmed</groupId> |
||||||
<artifactId>unionmed-framework</artifactId> |
<artifactId>unionmed-framework</artifactId> |
||||||
<version>0.0.9</version> |
<version>0.0.11</version> |
||||||
<packaging>pom</packaging> |
<packaging>pom</packaging> |
||||||
<name>unionmed-framework</name> |
<name>unionmed-framework</name> |
||||||
|
|
||||||
<modules> |
<modules> |
||||||
<module>framework-core</module> |
<module>framework-core</module> |
||||||
<module>framework-test</module> |
<module>framework-test</module> |
||||||
<module>framework-orm</module> |
<module>framework-orm</module> |
||||||
</modules> |
</modules> |
||||||
|
|
||||||
<distributionManagement> |
<distributionManagement> |
||||||
<!-- 版本发布 --> |
<!-- 版本发布 --> |
||||||
<repository> |
<repository> |
||||||
<id>unionmed</id> |
<id>unionmed</id> |
||||||
<name>Releases</name> |
<name>Releases</name> |
||||||
<url>http://47.118.41.58:8081/repository/unionmed-releases/</url> |
<url>http://47.118.41.58:8081/repository/unionmed-releases/</url> |
||||||
</repository> |
</repository> |
||||||
<snapshotRepository> |
<snapshotRepository> |
||||||
<id>unionmed</id> |
<id>unionmed</id> |
||||||
<name>Snapshots</name> |
<name>Snapshots</name> |
||||||
<url>http://47.118.41.58:8081/repository/unionmed-snapshots/</url> |
<url>http://47.118.41.58:8081/repository/unionmed-snapshots/</url> |
||||||
</snapshotRepository> |
</snapshotRepository> |
||||||
</distributionManagement> |
</distributionManagement> |
||||||
|
|
||||||
<properties> |
<properties> |
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
||||||
<java.version>1.8</java.version> |
<java.version>1.8</java.version> |
||||||
|
|
||||||
<httpclient.version>4.5.14</httpclient.version> |
<httpclient.version>4.5.14</httpclient.version> |
||||||
<httpasyncclient.version>4.1.5</httpasyncclient.version> |
<httpasyncclient.version>4.1.5</httpasyncclient.version> |
||||||
<c3p0.version>0.9.5.5</c3p0.version> |
<c3p0.version>0.9.5.5</c3p0.version> |
||||||
<hutool.version>4.5.15</hutool.version> |
<hutool.version>4.5.15</hutool.version> |
||||||
<fastjson.version>1.2.83</fastjson.version> |
<fastjson.version>1.2.83</fastjson.version> |
||||||
<druid.version>1.1.11</druid.version> |
<druid.version>1.1.11</druid.version> |
||||||
<druid.starter.version>1.1.21</druid.starter.version> |
<druid.starter.version>1.1.21</druid.starter.version> |
||||||
<ojdbc14.version>10.2.0.1.0</ojdbc14.version> |
<ojdbc14.version>10.2.0.1.0</ojdbc14.version> |
||||||
<minio.version>3.0.10</minio.version> |
<minio.version>3.0.10</minio.version> |
||||||
<mybatis.starter.version>1.3.2</mybatis.starter.version> |
<mybatis.starter.version>1.3.2</mybatis.starter.version> |
||||||
<pagehelper.starter.version>1.2.3</pagehelper.starter.version> |
<pagehelper.starter.version>1.2.3</pagehelper.starter.version> |
||||||
<mybatis.annotation.version>3.5.1</mybatis.annotation.version> |
<mybatis.annotation.version>3.5.1</mybatis.annotation.version> |
||||||
<japidocs.version>1.4.4</japidocs.version> |
<japidocs.version>1.4.4</japidocs.version> |
||||||
<feign-core.version>10.10.1</feign-core.version> |
<feign-core.version>10.10.1</feign-core.version> |
||||||
<springfox.swagger2.version>2.10.5</springfox.swagger2.version> |
<springfox.swagger2.version>2.10.5</springfox.swagger2.version> |
||||||
<swagger.knife4j.version>2.0.8</swagger.knife4j.version> |
<swagger.knife4j.version>2.0.8</swagger.knife4j.version> |
||||||
<spring-mvc-logger.version>0.2</spring-mvc-logger.version> |
<spring-mvc-logger.version>0.2</spring-mvc-logger.version> |
||||||
<guava.version>20.0</guava.version> |
<guava.version>20.0</guava.version> |
||||||
<gson.version>2.9.0</gson.version> |
<gson.version>2.9.0</gson.version> |
||||||
<com.util.version>1.0.0</com.util.version> |
<com.util.version>1.0.0</com.util.version> |
||||||
<log4j.version>1.2.12</log4j.version> |
<log4j.version>1.2.12</log4j.version> |
||||||
<rxnetty.version>0.4.9</rxnetty.version> |
<rxnetty.version>0.4.9</rxnetty.version> |
||||||
<mksapi.version>4.10.9049</mksapi.version> |
<mksapi.version>4.10.9049</mksapi.version> |
||||||
</properties> |
<bcprov.version>1.73</bcprov.version> |
||||||
|
</properties> |
||||||
|
|
||||||
<dependencyManagement> |
<dependencyManagement> |
||||||
<dependencies> |
<dependencies> |
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.unionmed</groupId> |
<groupId>com.unionmed</groupId> |
||||||
<artifactId>framework-core</artifactId> |
<artifactId>framework-core</artifactId> |
||||||
<version>${project.version}</version> |
<version>${project.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.unionmed</groupId> |
<groupId>com.unionmed</groupId> |
||||||
<artifactId>framework-test</artifactId> |
<artifactId>framework-test</artifactId> |
||||||
<version>${project.version}</version> |
<version>${project.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
|
|
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.mchange</groupId> |
<groupId>com.mchange</groupId> |
||||||
<artifactId>c3p0</artifactId> |
<artifactId>c3p0</artifactId> |
||||||
<version>${c3p0.version}</version> |
<version>${c3p0.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
|
|
||||||
<dependency> |
<dependency> |
||||||
<groupId>cn.hutool</groupId> |
<groupId>cn.hutool</groupId> |
||||||
<artifactId>hutool-all</artifactId> |
<artifactId>hutool-all</artifactId> |
||||||
<version>${hutool.version}</version> |
<version>${hutool.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
|
|
||||||
<!-- alibaba --> |
<!-- alibaba --> |
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.alibaba</groupId> |
<groupId>com.alibaba</groupId> |
||||||
<artifactId>fastjson</artifactId> |
<artifactId>fastjson</artifactId> |
||||||
<version>${fastjson.version}</version> |
<version>${fastjson.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.alibaba</groupId> |
<groupId>com.alibaba</groupId> |
||||||
<artifactId>druid</artifactId> |
<artifactId>druid</artifactId> |
||||||
<version>${druid.version}</version> |
<version>${druid.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.alibaba</groupId> |
<groupId>com.alibaba</groupId> |
||||||
<artifactId>druid-spring-boot-starter</artifactId> |
<artifactId>druid-spring-boot-starter</artifactId> |
||||||
<version>${druid.starter.version}</version> |
<version>${druid.starter.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
|
|
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.oracle</groupId> |
<groupId>com.oracle</groupId> |
||||||
<artifactId>ojdbc14</artifactId> |
<artifactId>ojdbc14</artifactId> |
||||||
<version>${ojdbc14.version}</version> |
<version>${ojdbc14.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
|
|
||||||
<!--<dependency>--> |
<!-- minio 相关依赖 --> |
||||||
<!--<groupId>com.oracle</groupId>--> |
<dependency> |
||||||
<!--<artifactId>ojdbc14</artifactId>--> |
<groupId>io.minio</groupId> |
||||||
<!--<version>10.2.0.4.0</version>--> |
<artifactId>minio</artifactId> |
||||||
<!--</dependency>--> |
<version>${minio.version}</version> |
||||||
|
</dependency> |
||||||
|
|
||||||
<!-- minio 相关依赖 --> |
<!-- 集成mybatis --> |
||||||
<dependency> |
<dependency> |
||||||
<groupId>io.minio</groupId> |
<groupId>org.mybatis.spring.boot</groupId> |
||||||
<artifactId>minio</artifactId> |
<artifactId>mybatis-spring-boot-starter</artifactId> |
||||||
<version>${minio.version}</version> |
<version>${mybatis.starter.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
|
<!--mybatis分页插件 --> |
||||||
|
<dependency> |
||||||
|
<groupId>com.github.pagehelper</groupId> |
||||||
|
<artifactId>pagehelper-spring-boot-starter</artifactId> |
||||||
|
<version>${pagehelper.starter.version}</version> |
||||||
|
</dependency> |
||||||
|
<dependency> |
||||||
|
<groupId>com.baomidou</groupId> |
||||||
|
<artifactId>mybatis-plus-annotation</artifactId> |
||||||
|
<version>${mybatis.annotation.version}</version> |
||||||
|
</dependency> |
||||||
|
|
||||||
<!-- 集成mybatis --> |
<dependency> |
||||||
<dependency> |
<groupId>io.github.yedaxia</groupId> |
||||||
<groupId>org.mybatis.spring.boot</groupId> |
<artifactId>japidocs</artifactId> |
||||||
<artifactId>mybatis-spring-boot-starter</artifactId> |
<version>${japidocs.version}</version> |
||||||
<version>${mybatis.starter.version}</version> |
</dependency> |
||||||
</dependency> |
<dependency> |
||||||
<!--mybatis分页插件 --> |
<groupId>io.github.openfeign</groupId> |
||||||
<dependency> |
<artifactId>feign-core</artifactId> |
||||||
<groupId>com.github.pagehelper</groupId> |
<version>${feign-core.version}</version> |
||||||
<artifactId>pagehelper-spring-boot-starter</artifactId> |
</dependency> |
||||||
<version>${pagehelper.starter.version}</version> |
|
||||||
</dependency> |
|
||||||
<dependency> |
|
||||||
<groupId>com.baomidou</groupId> |
|
||||||
<artifactId>mybatis-plus-annotation</artifactId> |
|
||||||
<version>${mybatis.annotation.version}</version> |
|
||||||
</dependency> |
|
||||||
|
|
||||||
<dependency> |
<!-- swagger --> |
||||||
<groupId>io.github.yedaxia</groupId> |
<dependency> |
||||||
<artifactId>japidocs</artifactId> |
<groupId>io.springfox</groupId> |
||||||
<version>${japidocs.version}</version> |
<artifactId>springfox-swagger2</artifactId> |
||||||
</dependency> |
<version>${springfox.swagger2.version}</version> |
||||||
<dependency> |
</dependency> |
||||||
<groupId>io.github.openfeign</groupId> |
<dependency> |
||||||
<artifactId>feign-core</artifactId> |
<groupId>io.springfox</groupId> |
||||||
<version>${feign-core.version}</version> |
<artifactId>springfox-spring-webmvc</artifactId> |
||||||
</dependency> |
<version>${springfox.swagger2.version}</version> |
||||||
|
</dependency> |
||||||
|
<dependency> |
||||||
|
<groupId>io.springfox</groupId> |
||||||
|
<artifactId>springfox-swagger-ui</artifactId> |
||||||
|
<version>${springfox.swagger2.version}</version> |
||||||
|
</dependency> |
||||||
|
<dependency> |
||||||
|
<groupId>com.github.xiaoymin</groupId> |
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId> |
||||||
|
<!--在引用时请在maven中央仓库搜索2.X最新版本号--> |
||||||
|
<version>${swagger.knife4j.version}</version> |
||||||
|
</dependency> |
||||||
|
|
||||||
<!-- swagger --> |
<dependency> |
||||||
<dependency> |
<groupId>com.github.isrsal</groupId> |
||||||
<groupId>io.springfox</groupId> |
<artifactId>spring-mvc-logger</artifactId> |
||||||
<artifactId>springfox-swagger2</artifactId> |
<version>${spring-mvc-logger.version}</version> |
||||||
<version>${springfox.swagger2.version}</version> |
<exclusions> |
||||||
</dependency> |
<exclusion> |
||||||
<dependency> |
<groupId>log4j</groupId> |
||||||
<groupId>io.springfox</groupId> |
<artifactId>log4j</artifactId> |
||||||
<artifactId>springfox-spring-webmvc</artifactId> |
</exclusion> |
||||||
<version>${springfox.swagger2.version}</version> |
<exclusion> |
||||||
</dependency> |
<groupId>javax.servlet</groupId> |
||||||
<dependency> |
<artifactId>servlet-api</artifactId> |
||||||
<groupId>io.springfox</groupId> |
</exclusion> |
||||||
<artifactId>springfox-swagger-ui</artifactId> |
<exclusion> |
||||||
<version>${springfox.swagger2.version}</version> |
<groupId>org.slf4j</groupId> |
||||||
</dependency> |
<artifactId>slf4j-log4j12</artifactId> |
||||||
<dependency> |
</exclusion> |
||||||
<groupId>com.github.xiaoymin</groupId> |
</exclusions> |
||||||
<artifactId>knife4j-spring-boot-starter</artifactId> |
</dependency> |
||||||
<!--在引用时请在maven中央仓库搜索2.X最新版本号--> |
|
||||||
<version>${swagger.knife4j.version}</version> |
|
||||||
</dependency> |
|
||||||
|
|
||||||
<!-- <dependency>--> |
<!-- Google --> |
||||||
<!-- <groupId>org.clojars.gukjoon</groupId>--> |
<dependency> |
||||||
<!-- <artifactId>ojdbc14</artifactId>--> |
<groupId>com.google.guava</groupId> |
||||||
<!-- <version>1.4</version>--> |
<artifactId>guava</artifactId> |
||||||
<!-- </dependency>--> |
<version>${guava.version}</version> |
||||||
|
</dependency> |
||||||
|
<dependency> |
||||||
|
<groupId>com.google.code.gson</groupId> |
||||||
|
<artifactId>gson</artifactId> |
||||||
|
<version>${gson.version}</version> |
||||||
|
</dependency> |
||||||
|
|
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.github.isrsal</groupId> |
<groupId>com</groupId> |
||||||
<artifactId>spring-mvc-logger</artifactId> |
<artifactId>com.util</artifactId> |
||||||
<version>${spring-mvc-logger.version}</version> |
<version>${com.util.version}</version> |
||||||
<exclusions> |
</dependency> |
||||||
<exclusion> |
<dependency> |
||||||
<groupId>log4j</groupId> |
<groupId>log4j</groupId> |
||||||
<artifactId>log4j</artifactId> |
<artifactId>log4j</artifactId> |
||||||
</exclusion> |
<version>${log4j.version}</version> |
||||||
<exclusion> |
</dependency> |
||||||
<groupId>javax.servlet</groupId> |
<dependency> |
||||||
<artifactId>servlet-api</artifactId> |
<groupId>io.reactivex</groupId> |
||||||
</exclusion> |
<artifactId>rxnetty</artifactId> |
||||||
<exclusion> |
<version>${rxnetty.version}</version> |
||||||
<groupId>org.slf4j</groupId> |
</dependency> |
||||||
<artifactId>slf4j-log4j12</artifactId> |
<dependency> |
||||||
</exclusion> |
<groupId>com.mks.api</groupId> |
||||||
</exclusions> |
<artifactId>mksapi-jar</artifactId> |
||||||
</dependency> |
<version>${mksapi.version}</version> |
||||||
|
</dependency> |
||||||
|
|
||||||
<!-- Google --> |
<!-- Apache: http-client --> |
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.google.guava</groupId> |
<groupId>org.apache.httpcomponents</groupId> |
||||||
<artifactId>guava</artifactId> |
<artifactId>httpcore</artifactId> |
||||||
<version>${guava.version}</version> |
<version>${httpcore.version}</version> |
||||||
</dependency> |
</dependency> |
||||||
<dependency> |
<dependency> |
||||||
<groupId>com.google.code.gson</groupId> |
<groupId>org.apache.httpcomponents</groupId> |
||||||
<artifactId>gson</artifactId> |
<artifactId>httpclient</artifactId> |
||||||
<version>${gson.version}</version> |
<version>${httpclient.version}</version> |
||||||
</dependency> |
<exclusions> |
||||||
|
<exclusion> |
||||||
|
<groupId>org.apache.httpcomponents</groupId> |
||||||
|
<artifactId>httpcore</artifactId> |
||||||
|
</exclusion> |
||||||
|
</exclusions> |
||||||
|
</dependency> |
||||||
|
<dependency> |
||||||
|
<groupId>org.apache.httpcomponents</groupId> |
||||||
|
<artifactId>httpasyncclient</artifactId> |
||||||
|
<version>${httpasyncclient.version}</version> |
||||||
|
</dependency> |
||||||
|
<dependency> |
||||||
|
<groupId>org.apache.httpcomponents</groupId> |
||||||
|
<artifactId>httpmime</artifactId> |
||||||
|
<version>${httpclient.version}</version> |
||||||
|
</dependency> |
||||||
|
|
||||||
<dependency> |
<!-- 加/解 密 --> |
||||||
<groupId>com</groupId> |
<dependency> |
||||||
<artifactId>com.util</artifactId> |
<groupId>org.bouncycastle</groupId> |
||||||
<version>${com.util.version}</version> |
<artifactId>bcprov-jdk18on</artifactId> |
||||||
</dependency> |
<version>${bcprov.version}</version> |
||||||
<!--<dependency> |
</dependency> |
||||||
<groupId>com.unionmed3</groupId> |
</dependencies> |
||||||
<artifactId>util4j</artifactId> |
</dependencyManagement> |
||||||
<version>1.0.0</version> |
|
||||||
</dependency>--> |
|
||||||
<dependency> |
|
||||||
<groupId>log4j</groupId> |
|
||||||
<artifactId>log4j</artifactId> |
|
||||||
<version>${log4j.version}</version> |
|
||||||
</dependency> |
|
||||||
<dependency> |
|
||||||
<groupId>io.reactivex</groupId> |
|
||||||
<artifactId>rxnetty</artifactId> |
|
||||||
<version>${rxnetty.version}</version> |
|
||||||
</dependency> |
|
||||||
<dependency> |
|
||||||
<groupId>com.mks.api</groupId> |
|
||||||
<artifactId>mksapi-jar</artifactId> |
|
||||||
<version>${mksapi.version}</version> |
|
||||||
</dependency> |
|
||||||
|
|
||||||
<!-- <dependency>--> |
|
||||||
<!-- <groupId>org.springframework.boot</groupId>--> |
|
||||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>--> |
|
||||||
<!-- <version>2.5.2</version>--> |
|
||||||
<!-- </dependency>--> |
|
||||||
|
|
||||||
<!-- Apache: http-client --> |
|
||||||
<dependency> |
|
||||||
<groupId>org.apache.httpcomponents</groupId> |
|
||||||
<artifactId>httpcore</artifactId> |
|
||||||
<version>${httpcore.version}</version> |
|
||||||
</dependency> |
|
||||||
<dependency> |
|
||||||
<groupId>org.apache.httpcomponents</groupId> |
|
||||||
<artifactId>httpclient</artifactId> |
|
||||||
<version>${httpclient.version}</version> |
|
||||||
<exclusions> |
|
||||||
<exclusion> |
|
||||||
<groupId>org.apache.httpcomponents</groupId> |
|
||||||
<artifactId>httpcore</artifactId> |
|
||||||
</exclusion> |
|
||||||
</exclusions> |
|
||||||
</dependency> |
|
||||||
<dependency> |
|
||||||
<groupId>org.apache.httpcomponents</groupId> |
|
||||||
<artifactId>httpasyncclient</artifactId> |
|
||||||
<version>${httpasyncclient.version}</version> |
|
||||||
</dependency> |
|
||||||
<dependency> |
|
||||||
<groupId>org.apache.httpcomponents</groupId> |
|
||||||
<artifactId>httpmime</artifactId> |
|
||||||
<version>${httpclient.version}</version> |
|
||||||
</dependency> |
|
||||||
</dependencies> |
|
||||||
</dependencyManagement> |
|
||||||
</project> |
</project> |
||||||
|
Loading…
Reference in new issue