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 |
@ -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.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 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" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<parent> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-parent</artifactId> |
||||
<version>2.3.4.RELEASE</version> |
||||
</parent> |
||||
<parent> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-parent</artifactId> |
||||
<version>2.3.4.RELEASE</version> |
||||
</parent> |
||||
|
||||
<modelVersion>4.0.0</modelVersion> |
||||
<groupId>com.unionmed</groupId> |
||||
<artifactId>unionmed-framework</artifactId> |
||||
<version>0.0.9</version> |
||||
<packaging>pom</packaging> |
||||
<name>unionmed-framework</name> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<groupId>com.unionmed</groupId> |
||||
<artifactId>unionmed-framework</artifactId> |
||||
<version>0.0.11</version> |
||||
<packaging>pom</packaging> |
||||
<name>unionmed-framework</name> |
||||
|
||||
<modules> |
||||
<module>framework-core</module> |
||||
<module>framework-test</module> |
||||
<module>framework-orm</module> |
||||
</modules> |
||||
<modules> |
||||
<module>framework-core</module> |
||||
<module>framework-test</module> |
||||
<module>framework-orm</module> |
||||
</modules> |
||||
|
||||
<distributionManagement> |
||||
<!-- 版本发布 --> |
||||
<repository> |
||||
<id>unionmed</id> |
||||
<name>Releases</name> |
||||
<url>http://47.118.41.58:8081/repository/unionmed-releases/</url> |
||||
</repository> |
||||
<snapshotRepository> |
||||
<id>unionmed</id> |
||||
<name>Snapshots</name> |
||||
<url>http://47.118.41.58:8081/repository/unionmed-snapshots/</url> |
||||
</snapshotRepository> |
||||
</distributionManagement> |
||||
<distributionManagement> |
||||
<!-- 版本发布 --> |
||||
<repository> |
||||
<id>unionmed</id> |
||||
<name>Releases</name> |
||||
<url>http://47.118.41.58:8081/repository/unionmed-releases/</url> |
||||
</repository> |
||||
<snapshotRepository> |
||||
<id>unionmed</id> |
||||
<name>Snapshots</name> |
||||
<url>http://47.118.41.58:8081/repository/unionmed-snapshots/</url> |
||||
</snapshotRepository> |
||||
</distributionManagement> |
||||
|
||||
<properties> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
||||
<java.version>1.8</java.version> |
||||
<properties> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
||||
<java.version>1.8</java.version> |
||||
|
||||
<httpclient.version>4.5.14</httpclient.version> |
||||
<httpasyncclient.version>4.1.5</httpasyncclient.version> |
||||
<c3p0.version>0.9.5.5</c3p0.version> |
||||
<hutool.version>4.5.15</hutool.version> |
||||
<fastjson.version>1.2.83</fastjson.version> |
||||
<druid.version>1.1.11</druid.version> |
||||
<druid.starter.version>1.1.21</druid.starter.version> |
||||
<ojdbc14.version>10.2.0.1.0</ojdbc14.version> |
||||
<minio.version>3.0.10</minio.version> |
||||
<mybatis.starter.version>1.3.2</mybatis.starter.version> |
||||
<pagehelper.starter.version>1.2.3</pagehelper.starter.version> |
||||
<mybatis.annotation.version>3.5.1</mybatis.annotation.version> |
||||
<japidocs.version>1.4.4</japidocs.version> |
||||
<feign-core.version>10.10.1</feign-core.version> |
||||
<springfox.swagger2.version>2.10.5</springfox.swagger2.version> |
||||
<swagger.knife4j.version>2.0.8</swagger.knife4j.version> |
||||
<spring-mvc-logger.version>0.2</spring-mvc-logger.version> |
||||
<guava.version>20.0</guava.version> |
||||
<gson.version>2.9.0</gson.version> |
||||
<com.util.version>1.0.0</com.util.version> |
||||
<log4j.version>1.2.12</log4j.version> |
||||
<rxnetty.version>0.4.9</rxnetty.version> |
||||
<mksapi.version>4.10.9049</mksapi.version> |
||||
</properties> |
||||
<httpclient.version>4.5.14</httpclient.version> |
||||
<httpasyncclient.version>4.1.5</httpasyncclient.version> |
||||
<c3p0.version>0.9.5.5</c3p0.version> |
||||
<hutool.version>4.5.15</hutool.version> |
||||
<fastjson.version>1.2.83</fastjson.version> |
||||
<druid.version>1.1.11</druid.version> |
||||
<druid.starter.version>1.1.21</druid.starter.version> |
||||
<ojdbc14.version>10.2.0.1.0</ojdbc14.version> |
||||
<minio.version>3.0.10</minio.version> |
||||
<mybatis.starter.version>1.3.2</mybatis.starter.version> |
||||
<pagehelper.starter.version>1.2.3</pagehelper.starter.version> |
||||
<mybatis.annotation.version>3.5.1</mybatis.annotation.version> |
||||
<japidocs.version>1.4.4</japidocs.version> |
||||
<feign-core.version>10.10.1</feign-core.version> |
||||
<springfox.swagger2.version>2.10.5</springfox.swagger2.version> |
||||
<swagger.knife4j.version>2.0.8</swagger.knife4j.version> |
||||
<spring-mvc-logger.version>0.2</spring-mvc-logger.version> |
||||
<guava.version>20.0</guava.version> |
||||
<gson.version>2.9.0</gson.version> |
||||
<com.util.version>1.0.0</com.util.version> |
||||
<log4j.version>1.2.12</log4j.version> |
||||
<rxnetty.version>0.4.9</rxnetty.version> |
||||
<mksapi.version>4.10.9049</mksapi.version> |
||||
<bcprov.version>1.73</bcprov.version> |
||||
</properties> |
||||
|
||||
<dependencyManagement> |
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>com.unionmed</groupId> |
||||
<artifactId>framework-core</artifactId> |
||||
<version>${project.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.unionmed</groupId> |
||||
<artifactId>framework-test</artifactId> |
||||
<version>${project.version}</version> |
||||
</dependency> |
||||
<dependencyManagement> |
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>com.unionmed</groupId> |
||||
<artifactId>framework-core</artifactId> |
||||
<version>${project.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.unionmed</groupId> |
||||
<artifactId>framework-test</artifactId> |
||||
<version>${project.version}</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>com.mchange</groupId> |
||||
<artifactId>c3p0</artifactId> |
||||
<version>${c3p0.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.mchange</groupId> |
||||
<artifactId>c3p0</artifactId> |
||||
<version>${c3p0.version}</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>cn.hutool</groupId> |
||||
<artifactId>hutool-all</artifactId> |
||||
<version>${hutool.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>cn.hutool</groupId> |
||||
<artifactId>hutool-all</artifactId> |
||||
<version>${hutool.version}</version> |
||||
</dependency> |
||||
|
||||
<!-- alibaba --> |
||||
<dependency> |
||||
<groupId>com.alibaba</groupId> |
||||
<artifactId>fastjson</artifactId> |
||||
<version>${fastjson.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.alibaba</groupId> |
||||
<artifactId>druid</artifactId> |
||||
<version>${druid.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.alibaba</groupId> |
||||
<artifactId>druid-spring-boot-starter</artifactId> |
||||
<version>${druid.starter.version}</version> |
||||
</dependency> |
||||
<!-- alibaba --> |
||||
<dependency> |
||||
<groupId>com.alibaba</groupId> |
||||
<artifactId>fastjson</artifactId> |
||||
<version>${fastjson.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.alibaba</groupId> |
||||
<artifactId>druid</artifactId> |
||||
<version>${druid.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.alibaba</groupId> |
||||
<artifactId>druid-spring-boot-starter</artifactId> |
||||
<version>${druid.starter.version}</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>com.oracle</groupId> |
||||
<artifactId>ojdbc14</artifactId> |
||||
<version>${ojdbc14.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.oracle</groupId> |
||||
<artifactId>ojdbc14</artifactId> |
||||
<version>${ojdbc14.version}</version> |
||||
</dependency> |
||||
|
||||
<!--<dependency>--> |
||||
<!--<groupId>com.oracle</groupId>--> |
||||
<!--<artifactId>ojdbc14</artifactId>--> |
||||
<!--<version>10.2.0.4.0</version>--> |
||||
<!--</dependency>--> |
||||
<!-- minio 相关依赖 --> |
||||
<dependency> |
||||
<groupId>io.minio</groupId> |
||||
<artifactId>minio</artifactId> |
||||
<version>${minio.version}</version> |
||||
</dependency> |
||||
|
||||
<!-- minio 相关依赖 --> |
||||
<dependency> |
||||
<groupId>io.minio</groupId> |
||||
<artifactId>minio</artifactId> |
||||
<version>${minio.version}</version> |
||||
</dependency> |
||||
<!-- 集成mybatis --> |
||||
<dependency> |
||||
<groupId>org.mybatis.spring.boot</groupId> |
||||
<artifactId>mybatis-spring-boot-starter</artifactId> |
||||
<version>${mybatis.starter.version}</version> |
||||
</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> |
||||
<groupId>org.mybatis.spring.boot</groupId> |
||||
<artifactId>mybatis-spring-boot-starter</artifactId> |
||||
<version>${mybatis.starter.version}</version> |
||||
</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> |
||||
<dependency> |
||||
<groupId>io.github.yedaxia</groupId> |
||||
<artifactId>japidocs</artifactId> |
||||
<version>${japidocs.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>io.github.openfeign</groupId> |
||||
<artifactId>feign-core</artifactId> |
||||
<version>${feign-core.version}</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>io.github.yedaxia</groupId> |
||||
<artifactId>japidocs</artifactId> |
||||
<version>${japidocs.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>io.github.openfeign</groupId> |
||||
<artifactId>feign-core</artifactId> |
||||
<version>${feign-core.version}</version> |
||||
</dependency> |
||||
<!-- swagger --> |
||||
<dependency> |
||||
<groupId>io.springfox</groupId> |
||||
<artifactId>springfox-swagger2</artifactId> |
||||
<version>${springfox.swagger2.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>io.springfox</groupId> |
||||
<artifactId>springfox-spring-webmvc</artifactId> |
||||
<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> |
||||
<groupId>io.springfox</groupId> |
||||
<artifactId>springfox-swagger2</artifactId> |
||||
<version>${springfox.swagger2.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>io.springfox</groupId> |
||||
<artifactId>springfox-spring-webmvc</artifactId> |
||||
<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> |
||||
<dependency> |
||||
<groupId>com.github.isrsal</groupId> |
||||
<artifactId>spring-mvc-logger</artifactId> |
||||
<version>${spring-mvc-logger.version}</version> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>log4j</groupId> |
||||
<artifactId>log4j</artifactId> |
||||
</exclusion> |
||||
<exclusion> |
||||
<groupId>javax.servlet</groupId> |
||||
<artifactId>servlet-api</artifactId> |
||||
</exclusion> |
||||
<exclusion> |
||||
<groupId>org.slf4j</groupId> |
||||
<artifactId>slf4j-log4j12</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
|
||||
<!-- <dependency>--> |
||||
<!-- <groupId>org.clojars.gukjoon</groupId>--> |
||||
<!-- <artifactId>ojdbc14</artifactId>--> |
||||
<!-- <version>1.4</version>--> |
||||
<!-- </dependency>--> |
||||
<!-- Google --> |
||||
<dependency> |
||||
<groupId>com.google.guava</groupId> |
||||
<artifactId>guava</artifactId> |
||||
<version>${guava.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.google.code.gson</groupId> |
||||
<artifactId>gson</artifactId> |
||||
<version>${gson.version}</version> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>com.github.isrsal</groupId> |
||||
<artifactId>spring-mvc-logger</artifactId> |
||||
<version>${spring-mvc-logger.version}</version> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>log4j</groupId> |
||||
<artifactId>log4j</artifactId> |
||||
</exclusion> |
||||
<exclusion> |
||||
<groupId>javax.servlet</groupId> |
||||
<artifactId>servlet-api</artifactId> |
||||
</exclusion> |
||||
<exclusion> |
||||
<groupId>org.slf4j</groupId> |
||||
<artifactId>slf4j-log4j12</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com</groupId> |
||||
<artifactId>com.util</artifactId> |
||||
<version>${com.util.version}</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> |
||||
|
||||
<!-- Google --> |
||||
<dependency> |
||||
<groupId>com.google.guava</groupId> |
||||
<artifactId>guava</artifactId> |
||||
<version>${guava.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.google.code.gson</groupId> |
||||
<artifactId>gson</artifactId> |
||||
<version>${gson.version}</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> |
||||
|
||||
<dependency> |
||||
<groupId>com</groupId> |
||||
<artifactId>com.util</artifactId> |
||||
<version>${com.util.version}</version> |
||||
</dependency> |
||||
<!--<dependency> |
||||
<groupId>com.unionmed3</groupId> |
||||
<artifactId>util4j</artifactId> |
||||
<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> |
||||
<!-- 加/解 密 --> |
||||
<dependency> |
||||
<groupId>org.bouncycastle</groupId> |
||||
<artifactId>bcprov-jdk18on</artifactId> |
||||
<version>${bcprov.version}</version> |
||||
</dependency> |
||||
</dependencies> |
||||
</dependencyManagement> |
||||
</project> |
||||
|
Loading…
Reference in new issue