29 changed files with 1960 additions and 1 deletions
@ -0,0 +1,148 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
|||
<component name="FacetManager"> |
|||
<facet type="Spring" name="Spring"> |
|||
<configuration /> |
|||
</facet> |
|||
</component> |
|||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> |
|||
<output url="file://$MODULE_DIR$/target/classes" /> |
|||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> |
|||
<content url="file://$MODULE_DIR$"> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> |
|||
<excludeFolder url="file://$MODULE_DIR$/target" /> |
|||
</content> |
|||
<orderEntry type="inheritedJdk" /> |
|||
<orderEntry type="sourceFolder" forTests="false" /> |
|||
<orderEntry type="module" module-name="epmet-commons-tools" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.7.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.60" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.60" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.7.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: commons-configuration:commons-configuration:1.8" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: commons-lang:commons-lang:2.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.14.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.14.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.14.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.8.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.10.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.3.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.6.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-base:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: ognl:ognl:3.2.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" /> |
|||
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-annotation:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-web:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.60" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.11.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.12" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.29" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.29" level="project" /> |
|||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.16" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" /> |
|||
</component> |
|||
</module> |
@ -0,0 +1,37 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<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"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<parent> |
|||
<artifactId>epmet-third-platform</artifactId> |
|||
<groupId>com.epmet</groupId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
|
|||
|
|||
<artifactId>epmet-third-platform-client</artifactId> |
|||
<packaging>jar</packaging> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-tools</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>io.springfox</groupId> |
|||
<artifactId>springfox-swagger2</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>io.springfox</groupId> |
|||
<artifactId>springfox-swagger-ui</artifactId> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<finalName>${project.artifactId}</finalName> |
|||
</build> |
|||
|
|||
</project> |
@ -0,0 +1,29 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:48 |
|||
*/ |
|||
public interface ThirdPlatformConstant { |
|||
|
|||
/** |
|||
* 第三方平台appId |
|||
*/ |
|||
String PLATFORM_APP_ID = "****************"; |
|||
|
|||
/** |
|||
* 第三方平台 secret |
|||
*/ |
|||
String PLATFORM_APP_SECRET = "****************"; |
|||
|
|||
/** |
|||
* 第三方平台 消息加解密Key |
|||
*/ |
|||
String PLATFORM_AES_KEY = "****************"; |
|||
|
|||
/** |
|||
* 第三方平台 消息校验Token |
|||
*/ |
|||
String PLATFORM_COMPONENT_TOKEN = "****************"; |
|||
|
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:57 |
|||
*/ |
|||
@Data |
|||
public class ThirdPlatformEventFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -8855993636150332559L; |
|||
|
|||
/** |
|||
* 时间戳 |
|||
*/ |
|||
private String timeStamp; |
|||
|
|||
/** |
|||
* 随机数 |
|||
*/ |
|||
private String nonce; |
|||
|
|||
/** |
|||
* 消息体签名 |
|||
*/ |
|||
private String msgSignature; |
|||
|
|||
/** |
|||
* 消息体 |
|||
*/ |
|||
private String postData; |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:08 |
|||
*/ |
|||
@Data |
|||
public class ResultBean implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -1528288965079007980L; |
|||
|
|||
private Object data; |
|||
|
|||
private String msg; |
|||
|
|||
private String errorMsg; |
|||
|
|||
private Integer code; |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.feign.fallback.EpmetThirdPlatformFeignClientFallback; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
|
|||
/** |
|||
* 本服务对外开放的API,其他服务通过引用此client调用该服务 |
|||
* |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/5 14:45 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.EPMET_THIRD_PLATFORM_SERVER, fallback = EpmetThirdPlatformFeignClientFallback.class) |
|||
|
|||
public interface EpmetThirdPlatformFeignClient { |
|||
} |
@ -0,0 +1,12 @@ |
|||
package com.epmet.feign.fallback; |
|||
|
|||
import com.epmet.feign.EpmetThirdPlatformFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/5 14:46 |
|||
*/ |
|||
@Component |
|||
public class EpmetThirdPlatformFeignClientFallback implements EpmetThirdPlatformFeignClient { |
|||
} |
@ -0,0 +1,31 @@ |
|||
HELP.md |
|||
target/ |
|||
!.mvn/wrapper/maven-wrapper.jar |
|||
!**/src/main/** |
|||
!**/src/test/** |
|||
|
|||
### STS ### |
|||
.apt_generated |
|||
.classpath |
|||
.factorypath |
|||
.project |
|||
.settings |
|||
.springBeans |
|||
.sts4-cache |
|||
|
|||
### IntelliJ IDEA ### |
|||
.idea |
|||
*.iws |
|||
*.iml |
|||
*.ipr |
|||
|
|||
### NetBeans ### |
|||
/nbproject/private/ |
|||
/nbbuild/ |
|||
/dist/ |
|||
/nbdist/ |
|||
/.nb-gradle/ |
|||
build/ |
|||
|
|||
### VS Code ### |
|||
.vscode/ |
@ -0,0 +1,17 @@ |
|||
version: "3.7" |
|||
services: |
|||
epmet-third-platform-server: |
|||
container_name: epmet-third-platform-server-dev |
|||
image: 192.168.1.130:10080/epmet-cloud-dev/epmet-third-platform-server:0.0.1 |
|||
ports: |
|||
- "8109:8109" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/dev:/logs" |
|||
environment: |
|||
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 250M |
@ -0,0 +1,17 @@ |
|||
version: "3.7" |
|||
services: |
|||
epmet-third-platform-server: |
|||
container_name: epmet-third-platform-server-test |
|||
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/epmet-third-platform-server:0.0.1 |
|||
ports: |
|||
- "8109:8109" |
|||
network_mode: host # 使用现有网络 |
|||
volumes: |
|||
- "/opt/epmet-cloud-logs/test:/logs" |
|||
environment: |
|||
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./app.jar" |
|||
deploy: |
|||
resources: |
|||
limits: |
|||
cpus: '0.1' |
|||
memory: 250M |
@ -0,0 +1,240 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
|||
<component name="FacetManager"> |
|||
<facet type="Spring" name="Spring"> |
|||
<configuration /> |
|||
</facet> |
|||
<facet type="web" name="Web"> |
|||
<configuration> |
|||
<webroots /> |
|||
<sourceRoots> |
|||
<root url="file://$MODULE_DIR$/src/main/java" /> |
|||
<root url="file://$MODULE_DIR$/src/main/resources" /> |
|||
</sourceRoots> |
|||
</configuration> |
|||
</facet> |
|||
</component> |
|||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> |
|||
<output url="file://$MODULE_DIR$/target/classes" /> |
|||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> |
|||
<content url="file://$MODULE_DIR$"> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> |
|||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> |
|||
<excludeFolder url="file://$MODULE_DIR$/target" /> |
|||
</content> |
|||
<orderEntry type="jdk" jdkName="1.8.0_121" jdkType="JavaSDK" /> |
|||
<orderEntry type="sourceFolder" forTests="false" /> |
|||
<orderEntry type="module" module-name="epmet-third-platform-client" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" /> |
|||
<orderEntry type="module" module-name="epmet-commons-tools" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.7.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.60" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.60" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.7.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:10.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-hystrix:10.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.14.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.14.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.14.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.8.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.43.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.13.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.10.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.3.Final" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.6.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-base:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: ognl:ognl:3.2.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" /> |
|||
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-annotation:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-web:4.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.60" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.jsoup:jsoup:1.11.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.12" level="project" /> |
|||
<orderEntry type="module" module-name="epmet-commons-mybatis" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.14" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.14" level="project" /> |
|||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.18" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.6.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.oracle:ojdbc6:11.2.0.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.microsoft.sqlserver:sqljdbc4:4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.postgresql:postgresql:42.2.8" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.12" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.0.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.12" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.29" level="project" /> |
|||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.29" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.29" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.29" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.1.9" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.1.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-nacos-discovery:2.1.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.1.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.1.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.1.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.1.4.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" /> |
|||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.1.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-nacos-config:2.1.0.RELEASE" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:3.2.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-dysmsapi:1.1.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.qcloudsms:qcloudsms:1.0.5" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.json:json:20170516" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.10" level="project" /> |
|||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.sun.mail:javax.mail:1.6.2" level="project" /> |
|||
<orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.28" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-httpclient:10.3.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:10.4.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.flywaydb:flyway-core:5.2.4" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" /> |
|||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.16" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.3" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-common:3.6.0" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.29" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.11" level="project" /> |
|||
<orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" /> |
|||
<orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" /> |
|||
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.29" level="project" /> |
|||
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" /> |
|||
</component> |
|||
</module> |
@ -0,0 +1,211 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<version>0.0.1</version> |
|||
|
|||
<parent> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-third-platform</artifactId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
|
|||
<artifactId>epmet-third-platform-server</artifactId> |
|||
<packaging>jar</packaging> |
|||
|
|||
<properties> |
|||
<aliyun.core.version>3.2.2</aliyun.core.version> |
|||
<aliyun.dysmsapi.version>1.1.0</aliyun.dysmsapi.version> |
|||
<qcloud.qcloudsms.version>1.0.5</qcloud.qcloudsms.version> |
|||
<freemarker.version>2.3.28</freemarker.version> |
|||
</properties> |
|||
|
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-third-platform-client</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-tools</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.epmet</groupId> |
|||
<artifactId>epmet-commons-mybatis</artifactId> |
|||
<version>2.0.0</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework</groupId> |
|||
<artifactId>spring-context-support</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-actuator</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba.cloud</groupId> |
|||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.aliyun</groupId> |
|||
<artifactId>aliyun-java-sdk-core</artifactId> |
|||
<version>${aliyun.core.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.aliyun</groupId> |
|||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId> |
|||
<version>${aliyun.dysmsapi.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.github.qcloudsms</groupId> |
|||
<artifactId>qcloudsms</artifactId> |
|||
<version>${qcloud.qcloudsms.version}</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.sun.mail</groupId> |
|||
<artifactId>javax.mail</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.freemarker</groupId> |
|||
<artifactId>freemarker</artifactId> |
|||
<version>${freemarker.version}</version> |
|||
</dependency> |
|||
<!-- 替换Feign原生httpclient --> |
|||
<dependency> |
|||
<groupId>io.github.openfeign</groupId> |
|||
<artifactId>feign-httpclient</artifactId> |
|||
<version>10.3.0</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.flywaydb</groupId> |
|||
<artifactId>flyway-core</artifactId> |
|||
<!--<version>5.1.1</version>--> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
<exclusions> |
|||
<exclusion> |
|||
<groupId>org.junit.vintage</groupId> |
|||
<artifactId>junit-vintage-engine</artifactId> |
|||
</exclusion> |
|||
</exclusions> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.dom4j</groupId> |
|||
<artifactId>dom4j</artifactId> |
|||
<version>2.1.3</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.github.binarywang</groupId> |
|||
<artifactId>weixin-java-common</artifactId> |
|||
<version>3.6.0</version> |
|||
<scope>compile</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<finalName>${project.artifactId}</finalName> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-surefire-plugin</artifactId> |
|||
<configuration> |
|||
<skipTests>true</skipTests> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory> |
|||
<resources> |
|||
<resource> |
|||
<filtering>true</filtering> |
|||
<directory>${basedir}/src/main/resources</directory> |
|||
</resource> |
|||
</resources> |
|||
</build> |
|||
<profiles> |
|||
<profile> |
|||
<id>dev</id> |
|||
<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation> |
|||
<properties> |
|||
<server.port>8109</server.port> |
|||
<spring.profiles.active>dev</spring.profiles.active> |
|||
|
|||
<!-- 数据库配置--> |
|||
<spring.datasource.druid.url> |
|||
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_message?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]> |
|||
</spring.datasource.druid.url> |
|||
<spring.datasource.druid.username>epmet_message_user</spring.datasource.druid.username> |
|||
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password> |
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>192.168.1.130</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>123456</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>false</nacos.register-enabled> |
|||
<nacos.server-addr>122.152.200.70:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
|
|||
<spring.flyway.enabled>false</spring.flyway.enabled> |
|||
</properties> |
|||
</profile> |
|||
<profile> |
|||
<id>test</id> |
|||
<!--<activation> |
|||
<activeByDefault>true</activeByDefault> |
|||
</activation>--> |
|||
<properties> |
|||
<server.port>8109</server.port> |
|||
<spring.profiles.active>test</spring.profiles.active> |
|||
|
|||
<!-- 数据库配置--> |
|||
<spring.datasource.druid.url> |
|||
<![CDATA[jdbc:mysql://rm-m5ef9t617j6o5eup7.mysql.rds.aliyuncs.com:3306/epmet_message?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]> |
|||
</spring.datasource.druid.url> |
|||
<spring.datasource.druid.username>epmet</spring.datasource.druid.username> |
|||
<spring.datasource.druid.password>elink@833066</spring.datasource.druid.password> |
|||
<!-- redis配置 --> |
|||
<spring.redis.index>0</spring.redis.index> |
|||
<spring.redis.host>r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com</spring.redis.host> |
|||
<spring.redis.port>6379</spring.redis.port> |
|||
<spring.redis.password>EpmEtrEdIs!q@w</spring.redis.password> |
|||
<!-- nacos --> |
|||
<nacos.register-enabled>true</nacos.register-enabled> |
|||
<nacos.server-addr>192.168.10.150:8848</nacos.server-addr> |
|||
<nacos.discovery.namespace>67e3c350-533e-4d7c-9f8f-faf1b4aa82ae</nacos.discovery.namespace> |
|||
<nacos.config.namespace></nacos.config.namespace> |
|||
<nacos.config.group></nacos.config.group> |
|||
<nacos.config-enabled>false</nacos.config-enabled> |
|||
<nacos.ip/> |
|||
|
|||
<spring.flyway.enabled>true</spring.flyway.enabled> |
|||
</properties> |
|||
</profile> |
|||
</profiles> |
|||
|
|||
</project> |
@ -0,0 +1,17 @@ |
|||
package com.epmet; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
|||
import org.springframework.cloud.openfeign.EnableFeignClients; |
|||
|
|||
@SpringBootApplication |
|||
@EnableDiscoveryClient |
|||
@EnableFeignClients |
|||
public class EpmetThirdPlatformApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(EpmetThirdPlatformApplication.class, args); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.epmet.aspect; |
|||
|
|||
import com.epmet.commons.tools.aspect.BaseRequestLogAspect; |
|||
import org.aspectj.lang.ProceedingJoinPoint; |
|||
import org.aspectj.lang.annotation.Around; |
|||
import org.aspectj.lang.annotation.Aspect; |
|||
import org.springframework.core.annotation.Order; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.context.request.RequestAttributes; |
|||
import org.springframework.web.context.request.RequestContextHolder; |
|||
import org.springframework.web.context.request.ServletRequestAttributes; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
|
|||
/** |
|||
* 日志/异常处理切面实现,调用父类方法完成日志记录和异常处理。 |
|||
*/ |
|||
@Aspect |
|||
@Component |
|||
@Order(0) |
|||
public class RequestLogAspect extends BaseRequestLogAspect { |
|||
|
|||
@Override |
|||
@Around(value = "execution(* com.epmet.controller.*Controller*.*(..)) ") |
|||
public Object proceed(ProceedingJoinPoint point) throws Throwable { |
|||
return super.proceed(point, getRequest()); |
|||
} |
|||
|
|||
/** |
|||
* 获取Request对象 |
|||
* |
|||
* @return |
|||
*/ |
|||
private HttpServletRequest getRequest() { |
|||
RequestAttributes ra = RequestContextHolder.getRequestAttributes(); |
|||
ServletRequestAttributes sra = (ServletRequestAttributes) ra; |
|||
return sra.getRequest(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.epmet.config; |
|||
|
|||
import com.epmet.commons.tools.config.ModuleConfig; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 模块配置信息 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
@Service |
|||
public class ModuleConfigImpl implements ModuleConfig { |
|||
@Override |
|||
public String getName() { |
|||
return "epmetthirdplatform"; |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.dto.form.ThirdPlatformEventFormDTO; |
|||
import com.epmet.dto.result.ResultBean; |
|||
import com.epmet.service.DbyWechatExtService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:07 |
|||
*/ |
|||
@Slf4j |
|||
@RestController |
|||
public class ComponentVerifyTicketController { |
|||
|
|||
private DbyWechatExtService dbyWechatExtService; |
|||
|
|||
@PostMapping(value = "/event") |
|||
public ResponseEntity<ResultBean> wechatPlatformEvent(@RequestBody ThirdPlatformEventFormDTO formDTO) { |
|||
ResultBean resultBean = new ResultBean(); |
|||
ResponseEntity<ResultBean> responseEntity; |
|||
log.info("授权事件接收URL,验证票据"); |
|||
try { |
|||
resultBean.setData(dbyWechatExtService.parseRequest(formDTO)); |
|||
responseEntity = new ResponseEntity<ResultBean>(resultBean, HttpStatus.OK); |
|||
log.info("第三方平台授权事件接收URL,验证票据成功"); |
|||
} catch (Exception e) { |
|||
log.error("第三方平台授权事件接收URL,验证票据异常", e.getMessage(), e); |
|||
ResultBean errorResultBean = new ResultBean(); |
|||
errorResultBean.setMsg("第三方平台授权事件接收URL,验证票据异常"); |
|||
errorResultBean.setErrorMsg(e.getMessage()); |
|||
errorResultBean.setCode(422); |
|||
responseEntity = new ResponseEntity<ResultBean>(errorResultBean, HttpStatus.UNPROCESSABLE_ENTITY); |
|||
} |
|||
return responseEntity; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.epmet.exception; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 10:03 |
|||
*/ |
|||
@SuppressWarnings("serial") |
|||
public class AesException extends Exception { |
|||
|
|||
public final static int OK = 0; |
|||
public final static int ValidateSignatureError = -40001; |
|||
public final static int ParseXmlError = -40002; |
|||
public final static int ComputeSignatureError = -40003; |
|||
public final static int IllegalAesKey = -40004; |
|||
public final static int ValidateCorpidError = -40005; |
|||
public final static int EncryptAESError = -40006; |
|||
public final static int DecryptAESError = -40007; |
|||
public final static int IllegalBuffer = -40008; |
|||
public final static int EncodeBase64Error = -40009; |
|||
public final static int DecodeBase64Error = -40010; |
|||
public final static int GenReturnXmlError = -40011; |
|||
|
|||
private int code; |
|||
|
|||
private static String getMessage(int code) { |
|||
switch (code) { |
|||
case ValidateSignatureError: |
|||
return "签名验证错误"; |
|||
case ParseXmlError: |
|||
return "xml解析失败"; |
|||
case ComputeSignatureError: |
|||
return "sha加密生成签名失败"; |
|||
case IllegalAesKey: |
|||
return "SymmetricKey非法"; |
|||
case ValidateCorpidError: |
|||
return "corpid校验失败"; |
|||
case EncryptAESError: |
|||
return "aes加密失败"; |
|||
case DecryptAESError: |
|||
return "aes解密失败"; |
|||
case IllegalBuffer: |
|||
return "解密后得到的buffer非法"; |
|||
case EncodeBase64Error: |
|||
return "base64加密错误"; |
|||
case DecodeBase64Error: |
|||
return "base64解密错误"; |
|||
case GenReturnXmlError: |
|||
return "xml生成失败"; |
|||
default: |
|||
return null; // cannot be
|
|||
} |
|||
} |
|||
|
|||
public int getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public AesException(int code) { |
|||
super(getMessage(code)); |
|||
this.code = code; |
|||
} |
|||
|
|||
} |
|||
|
|||
|
@ -0,0 +1,24 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.dto.form.ThirdPlatformEventFormDTO; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:12 |
|||
*/ |
|||
public interface DbyWechatExtService { |
|||
|
|||
/** |
|||
* 获得授权事件的票据 |
|||
* |
|||
* @param timestamp 时间戳 |
|||
* @param nonce 随机数 |
|||
* @param msgSignature 消息体签名 |
|||
* @param postData 消息体 |
|||
* @return 如果获得只需要返回 SUCCESS |
|||
* @Author zxc |
|||
*/ |
|||
String parseRequest(ThirdPlatformEventFormDTO formDTO); |
|||
|
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.epmet.constant.ThirdPlatformConstant; |
|||
import com.epmet.dto.form.ThirdPlatformEventFormDTO; |
|||
import com.epmet.exception.AesException; |
|||
import com.epmet.service.DbyWechatExtService; |
|||
import com.epmet.util.ModuleConstant; |
|||
import com.epmet.util.WXBizMsgCrypt; |
|||
import com.epmet.util.WXXmlToMapUtil; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.MapUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.data.redis.core.RedisTemplate; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Map; |
|||
import java.util.concurrent.TimeUnit; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:13 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class DbyWechatExtServiceImpl implements DbyWechatExtService { |
|||
|
|||
@Autowired |
|||
private RedisTemplate redisTemplate; |
|||
|
|||
@Override |
|||
public String parseRequest(ThirdPlatformEventFormDTO formDTO) { |
|||
String msgSignature = formDTO.getMsgSignature(); |
|||
String nonce = formDTO.getNonce(); |
|||
String postData = formDTO.getPostData(); |
|||
String timeStamp = formDTO.getTimeStamp(); |
|||
log.info(ModuleConstant.START_RECEIVE); |
|||
try { |
|||
//这个类是微信官网提供的解密类,需要用到消息校验Token 消息加密Key和服务平台appid
|
|||
WXBizMsgCrypt pc = new WXBizMsgCrypt(ThirdPlatformConstant.PLATFORM_COMPONENT_TOKEN, ThirdPlatformConstant.PLATFORM_AES_KEY, ThirdPlatformConstant.PLATFORM_APP_ID); |
|||
String xml = pc.decryptMsg(msgSignature, timeStamp, nonce, postData); |
|||
// 将xml转为map
|
|||
Map<String, String> result = WXXmlToMapUtil.xmlToMap(xml); |
|||
String componentVerifyTicket = MapUtils.getString(result,ModuleConstant.TICKET_KEY); |
|||
if (StringUtils.isNotEmpty(componentVerifyTicket)) { |
|||
// 存储平台授权票据,保存ticket
|
|||
redisTemplate.opsForValue().set(ModuleConstant.TICKET_UNDERLINE_KEY, componentVerifyTicket, 60 * 10, TimeUnit.SECONDS); |
|||
String verifyTicket = redisTemplate.opsForValue().get(ModuleConstant.TICKET_UNDERLINE_KEY).toString(); |
|||
log.info(String.format(ModuleConstant.AUTH_TICKET,verifyTicket)); |
|||
} else { |
|||
throw new RuntimeException(ModuleConstant.ERROR_TICKET); |
|||
} |
|||
} catch (AesException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
log.info(ModuleConstant.SUCCESS_TICKET); |
|||
return ModuleConstant.SUCCESS; |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.util; |
|||
|
|||
/** |
|||
* @Description |
|||
* @author zxc |
|||
*/ |
|||
public interface ModuleConstant { |
|||
|
|||
String START_RECEIVE = "==============================开始授权事件接收URL================================="; |
|||
|
|||
String TICKET_KEY = "ComponentVerifyTicket"; |
|||
|
|||
String TICKET_UNDERLINE_KEY = "component_verify_ticket"; |
|||
|
|||
String AUTH_TICKET = "====================授权票据【ComponentVerifyTicket】:【%s】===================="; |
|||
|
|||
String ERROR_TICKET = "微信开放平台,第三方平台获取【验证票据】失败"; |
|||
|
|||
String SUCCESS_TICKET = "==============================结束授权事件接收URL================================="; |
|||
|
|||
String SUCCESS = "success"; |
|||
|
|||
} |
@ -0,0 +1,246 @@ |
|||
package com.epmet.util; |
|||
|
|||
import com.epmet.exception.AesException; |
|||
import me.chanjar.weixin.common.util.crypto.PKCS7Encoder; |
|||
import org.apache.commons.codec.binary.Base64; |
|||
import org.w3c.dom.Document; |
|||
import org.w3c.dom.Element; |
|||
import org.w3c.dom.NodeList; |
|||
import org.xml.sax.InputSource; |
|||
|
|||
import java.io.StringReader; |
|||
import java.nio.charset.Charset; |
|||
import java.security.MessageDigest; |
|||
import java.util.Arrays; |
|||
|
|||
import javax.crypto.Cipher; |
|||
import javax.crypto.spec.IvParameterSpec; |
|||
import javax.crypto.spec.SecretKeySpec; |
|||
import javax.xml.parsers.DocumentBuilder; |
|||
import javax.xml.parsers.DocumentBuilderFactory; |
|||
|
|||
/** |
|||
* 提供接收和推送给公众平台消息的加解密接口(UTF8编码的字符串). |
|||
* <ol> * <li>第三方回复加密消息给公众平台</li> * <li>第三方收到公众平台发送的消息,验证消息的安全性,并对消息进行解密。</li> |
|||
* </ol> |
|||
* 说明:异常java.security.InvalidKeyException:illegal Key Size的解决方案 |
|||
* <ol> |
|||
* <li>在官方网站下载JCE无限制权限策略文件(JDK7的下载地址: * |
|||
* http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html</li>
|
|||
* <li>下载后解压,可以看到local_policy.jar和US_export_policy.jar以及readme.txt</li> |
|||
* <li>如果安装了JRE,将两个jar文件放到%JRE_HOME%\lib\security目录下覆盖原来的文件</li> |
|||
* <li>如果安装了JDK,将两个jar文件放到%JDK_HOME%\jre\lib\security目录下覆盖原来文件</li> |
|||
* |
|||
* </ol> |
|||
*/ |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:51 |
|||
*/ |
|||
public class WXBizMsgCrypt { |
|||
static Charset CHARSET = Charset.forName("utf-8"); |
|||
Base64 base64 = new Base64(); |
|||
byte[] aesKey; |
|||
String token; |
|||
String appId; |
|||
|
|||
/** |
|||
* 构造函数 |
|||
* @param token 公众平台上,开发者设置的token |
|||
* @param encodingAesKey 公众平台上,开发者设置的EncodingAESKey |
|||
* @param appId 公众平台appid |
|||
* |
|||
* @throws AesException 执行失败,请查看该异常的错误码和具体的错误信息 |
|||
*/ |
|||
public WXBizMsgCrypt(String token, String encodingAesKey, String appId) throws AesException { |
|||
if (encodingAesKey.length() != 43) { |
|||
throw new AesException(AesException.IllegalAesKey); |
|||
} |
|||
|
|||
this.token = token; |
|||
this.appId = appId; |
|||
aesKey = Base64.decodeBase64(encodingAesKey + "="); |
|||
} |
|||
|
|||
// 还原4个字节的网络字节序
|
|||
int recoverNetworkBytesOrder(byte[] orderBytes) { |
|||
int sourceNumber = 0; |
|||
for (int i = 0; i < 4; i++) { |
|||
sourceNumber <<= 8; |
|||
sourceNumber |= orderBytes[i] & 0xff; |
|||
} |
|||
return sourceNumber; |
|||
} |
|||
|
|||
/** |
|||
* 对密文进行解密. |
|||
* @param text 需要解密的密文 |
|||
* @return 解密得到的明文 |
|||
* @throws AesException aes解密失败 |
|||
*/ |
|||
String decrypt(String text) throws AesException { |
|||
byte[] original; |
|||
try { |
|||
// 设置解密模式为AES的CBC模式
|
|||
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); |
|||
SecretKeySpec key_spec = new SecretKeySpec(aesKey, "AES"); |
|||
IvParameterSpec iv = new IvParameterSpec(Arrays.copyOfRange(aesKey, 0, 16)); |
|||
cipher.init(Cipher.DECRYPT_MODE, key_spec, iv); |
|||
|
|||
// 使用BASE64对密文进行解码
|
|||
byte[] encrypted = Base64.decodeBase64(text); |
|||
|
|||
// 解密
|
|||
original = cipher.doFinal(encrypted); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
throw new AesException(AesException.DecryptAESError); |
|||
} |
|||
|
|||
String xmlContent, from_appid; |
|||
try { |
|||
// 去除补位字符
|
|||
byte[] bytes = PKCS7Encoder.decode(original); |
|||
|
|||
// 分离16位随机字符串,网络字节序和AppId
|
|||
byte[] networkOrder = Arrays.copyOfRange(bytes, 16, 20); |
|||
|
|||
int xmlLength = recoverNetworkBytesOrder(networkOrder); |
|||
|
|||
xmlContent = new String(Arrays.copyOfRange(bytes, 20, 20 + xmlLength), CHARSET); |
|||
from_appid = |
|||
new String(Arrays.copyOfRange(bytes, 20 + xmlLength, bytes.length), CHARSET); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
throw new AesException(AesException.IllegalBuffer); |
|||
} |
|||
|
|||
// appid不相同的情况
|
|||
if (!from_appid.equals(appId)) { |
|||
throw new AesException(AesException.ValidateSignatureError); |
|||
} |
|||
return xmlContent; |
|||
|
|||
} |
|||
|
|||
/** |
|||
* * 检验消息的真实性,并且获取解密后的明文. |
|||
* <ol> |
|||
* <li>利用收到的密文生成安全签名,进行签名验证</li> |
|||
* <li>若验证通过,则提取xml中的加密消息</li> |
|||
* <li>对消息进行解密</li> |
|||
* </ol> |
|||
* |
|||
* @param msgSignature 签名串,对应URL参数的msg_signature |
|||
* @param timeStamp 时间戳,对应URL参数的timestamp |
|||
* @param nonce 随机串,对应URL参数的nonce |
|||
* @param postData 密文,对应POST请求的数据 |
|||
* @return 解密后的原文 |
|||
* @throws AesException 执行失败,请查看该异常的错误码和具体的错误信息 |
|||
*/ |
|||
public String decryptMsg(String msgSignature, String timeStamp, String nonce, String postData) |
|||
throws AesException { |
|||
|
|||
// 密钥,公众账号的app secret
|
|||
// 提取密文
|
|||
Object[] encrypt = extract(postData); |
|||
|
|||
// 验证安全签名
|
|||
String signature = getSHA1(token, timeStamp, nonce, encrypt[1].toString()); |
|||
|
|||
// 和URL中的签名比较是否相等
|
|||
// System.out.println("第三方收到URL中的签名:" + msg_sign);
|
|||
// System.out.println("第三方校验签名:" + signature);
|
|||
if (!signature.equals(msgSignature)) { |
|||
throw new AesException(AesException.ValidateSignatureError); |
|||
} |
|||
|
|||
// 解密
|
|||
String result = decrypt(encrypt[1].toString()); |
|||
return result; |
|||
} |
|||
|
|||
/** |
|||
* 提取出xml数据包中的加密消息 |
|||
* @param xmltext 待提取的xml字符串 |
|||
* @return 提取出的加密消息字符串 |
|||
* @throws AesException |
|||
*/ |
|||
public static Object[] extract(String xmltext) throws AesException { |
|||
Object[] result = new Object[3]; |
|||
try { |
|||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); |
|||
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); |
|||
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false); |
|||
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false); |
|||
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); |
|||
dbf.setXIncludeAware(false); |
|||
dbf.setExpandEntityReferences(false); |
|||
DocumentBuilder db = dbf.newDocumentBuilder(); |
|||
StringReader sr = new StringReader(xmltext); |
|||
InputSource is = new InputSource(sr); |
|||
Document document = db.parse(is); |
|||
|
|||
Element root = document.getDocumentElement(); |
|||
NodeList nodelist1 = root.getElementsByTagName("Encrypt"); |
|||
NodeList nodelist2 = root.getElementsByTagName("ToUserName"); |
|||
result[0] = 0; |
|||
result[1] = nodelist1.item(0).getTextContent(); |
|||
|
|||
//注意这里,获取ticket中的xml里面没有ToUserName这个元素,官网原示例代码在这里会报空
|
|||
//空指针,所以需要处理一下
|
|||
if (nodelist2 != null) { |
|||
if (nodelist2.item(0) != null) { |
|||
result[2] = nodelist2.item(0).getTextContent(); |
|||
} |
|||
} |
|||
return result; |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
throw new AesException(AesException.ParseXmlError); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 用SHA1算法生成安全签名 |
|||
* @param token 票据 |
|||
* @param timestamp 时间戳 |
|||
* @param nonce 随机字符串 |
|||
* @param encrypt 密文 |
|||
* @return 安全签名 |
|||
* @throws |
|||
* AesException |
|||
*/ |
|||
public static String getSHA1(String token, String timestamp, String nonce, String encrypt) |
|||
throws AesException { |
|||
try { |
|||
String[] array = new String[]{token, timestamp, nonce, encrypt}; |
|||
StringBuffer sb = new StringBuffer(); |
|||
// 字符串排序
|
|||
Arrays.sort(array); |
|||
for (int i = 0; i < 4; i++) { |
|||
sb.append(array[i]); |
|||
} |
|||
String str = sb.toString(); |
|||
// SHA1签名生成
|
|||
MessageDigest md = MessageDigest.getInstance("SHA-1"); |
|||
md.update(str.getBytes()); |
|||
byte[] digest = md.digest(); |
|||
|
|||
StringBuffer hexstr = new StringBuffer(); |
|||
String shaHex = ""; |
|||
for (int i = 0; i < digest.length; i++) { |
|||
shaHex = Integer.toHexString(digest[i] & 0xFF); |
|||
if (shaHex.length() < 2) { |
|||
hexstr.append(0); |
|||
} |
|||
hexstr.append(shaHex); |
|||
} |
|||
return hexstr.toString(); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
throw new AesException(AesException.ComputeSignatureError); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,230 @@ |
|||
package com.epmet.util; |
|||
|
|||
import org.dom4j.Document; |
|||
import org.dom4j.DocumentException; |
|||
import org.dom4j.DocumentHelper; |
|||
import org.dom4j.Element; |
|||
import org.dom4j.io.OutputFormat; |
|||
import org.dom4j.io.SAXReader; |
|||
import org.dom4j.io.XMLWriter; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.w3c.dom.Node; |
|||
import org.w3c.dom.NodeList; |
|||
|
|||
import java.io.ByteArrayInputStream; |
|||
import java.io.InputStream; |
|||
import java.io.StringReader; |
|||
import java.io.StringWriter; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
import javax.xml.parsers.DocumentBuilder; |
|||
import javax.xml.parsers.DocumentBuilderFactory; |
|||
import javax.xml.transform.OutputKeys; |
|||
import javax.xml.transform.Transformer; |
|||
import javax.xml.transform.TransformerFactory; |
|||
import javax.xml.transform.dom.DOMSource; |
|||
import javax.xml.transform.stream.StreamResult; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/6 9:51 |
|||
*/ |
|||
public class WXXmlToMapUtil { |
|||
|
|||
private static final Logger logger = LoggerFactory.getLogger(WXXmlToMapUtil.class); |
|||
|
|||
/** |
|||
* XML格式字符串转换为Map |
|||
* |
|||
* @param xml XML字符串 |
|||
* @return XML数据转换后的Map |
|||
*/ |
|||
public static Map<String, String> xmlToMap(String xml) { |
|||
try { |
|||
Map<String, String> data = new HashMap<>(); |
|||
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); |
|||
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); |
|||
InputStream stream = new ByteArrayInputStream(xml.getBytes("UTF-8")); |
|||
org.w3c.dom.Document doc = documentBuilder.parse(stream); |
|||
doc.getDocumentElement().normalize(); |
|||
NodeList nodeList = doc.getDocumentElement().getChildNodes(); |
|||
for (int idx = 0; idx < nodeList.getLength(); ++idx) { |
|||
Node node = nodeList.item(idx); |
|||
if (node.getNodeType() == Node.ELEMENT_NODE) { |
|||
org.w3c.dom.Element element = (org.w3c.dom.Element) node; |
|||
data.put(element.getNodeName(), element.getTextContent()); |
|||
} |
|||
} |
|||
stream.close(); |
|||
return data; |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 将Map转换为XML格式的字符串 |
|||
* |
|||
* @param data Map类型数据 |
|||
* @return XML格式的字符串 |
|||
*/ |
|||
public static String mapToXml(Map<String, String> data) throws Exception { |
|||
try { |
|||
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); |
|||
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); |
|||
org.w3c.dom.Document document = documentBuilder.newDocument(); |
|||
org.w3c.dom.Element root = document.createElement("xml"); |
|||
document.appendChild(root); |
|||
for (String key : data.keySet()) { |
|||
String value = data.get(key); |
|||
if (value == null) { |
|||
value = ""; |
|||
} |
|||
value = value.trim(); |
|||
org.w3c.dom.Element filed = document.createElement(key); |
|||
filed.appendChild(document.createTextNode(value)); |
|||
root.appendChild(filed); |
|||
} |
|||
TransformerFactory tf = TransformerFactory.newInstance(); |
|||
Transformer transformer = tf.newTransformer(); |
|||
DOMSource source = new DOMSource(document); |
|||
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); |
|||
transformer.setOutputProperty(OutputKeys.INDENT, "yes"); |
|||
StringWriter writer = new StringWriter(); |
|||
StreamResult result = new StreamResult(writer); |
|||
transformer.transform(source, result); |
|||
String output = writer.getBuffer().toString(); //.replaceAll("\n|\r", "");
|
|||
writer.close(); |
|||
return output; |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* (多层)xml格式字符串转换为map |
|||
* |
|||
* @param xml xml字符串 |
|||
* @return 第一个为Root节点,Root节点之后为Root的元素,如果为多层,可以通过key获取下一层Map |
|||
*/ |
|||
public static Map<String, Object> multilayerXmlToMap(String xml) { |
|||
Document doc = null; |
|||
try { |
|||
doc = DocumentHelper.parseText(xml); |
|||
} catch (DocumentException e) { |
|||
logger.error("xml字符串解析,失败 --> {}", e); |
|||
} |
|||
Map<String, Object> map = new HashMap<>(); |
|||
if (null == doc) { |
|||
return map; |
|||
} |
|||
// 获取根元素
|
|||
Element rootElement = doc.getRootElement(); |
|||
recursionXmlToMap(rootElement, map); |
|||
return map; |
|||
} |
|||
|
|||
/** |
|||
* multilayerXmlToMap核心方法,递归调用 |
|||
* |
|||
* @param element 节点元素 |
|||
* @param outmap 用于存储xml数据的map |
|||
*/ |
|||
private static void recursionXmlToMap(Element element, Map<String, Object> outmap) { |
|||
// 得到根元素下的子元素列表
|
|||
List<Element> list = element.elements(); |
|||
int size = list.size(); |
|||
if (size == 0) { |
|||
// 如果没有子元素,则将其存储进map中
|
|||
outmap.put(element.getName(), element.getTextTrim()); |
|||
} else { |
|||
// innermap用于存储子元素的属性名和属性值
|
|||
Map<String, Object> innermap = new HashMap<>(); |
|||
// 遍历子元素
|
|||
list.forEach(childElement -> recursionXmlToMap(childElement, innermap)); |
|||
outmap.put(element.getName(), innermap); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* (多层)map转换为xml格式字符串 |
|||
* |
|||
* @param map 需要转换为xml的map |
|||
* @param isCDATA 是否加入CDATA标识符 true:加入 false:不加入 |
|||
* @return xml字符串 |
|||
*/ |
|||
public static String multilayerMapToXml(Map<String, Object> map, boolean isCDATA) { |
|||
String parentName = "xml"; |
|||
Document doc = DocumentHelper.createDocument(); |
|||
doc.addElement(parentName); |
|||
String xml = recursionMapToXml(doc.getRootElement(), parentName, map, isCDATA); |
|||
return formatXML(xml); |
|||
} |
|||
|
|||
/** |
|||
* multilayerMapToXml核心方法,递归调用 |
|||
* |
|||
* @param element 节点元素 |
|||
* @param parentName 根元素属性名 |
|||
* @param map 需要转换为xml的map |
|||
* @param isCDATA 是否加入CDATA标识符 true:加入 false:不加入 |
|||
* @return xml字符串 |
|||
*/ |
|||
private static String recursionMapToXml(Element element, String parentName, Map<String, Object> map, boolean isCDATA) { |
|||
Element xmlElement = element.addElement(parentName); |
|||
map.keySet().forEach(key -> { |
|||
Object obj = map.get(key); |
|||
if (obj instanceof Map) { |
|||
recursionMapToXml(xmlElement, key, (Map<String, Object>) obj, isCDATA); |
|||
} else { |
|||
String value = obj == null ? "" : obj.toString(); |
|||
if (isCDATA) { |
|||
xmlElement.addElement(key).addCDATA(value); |
|||
} else { |
|||
xmlElement.addElement(key).addText(value); |
|||
} |
|||
} |
|||
}); |
|||
return xmlElement.asXML(); |
|||
} |
|||
|
|||
/** |
|||
* 格式化xml,显示为容易看的XML格式 |
|||
* |
|||
* @param xml 需要格式化的xml字符串 |
|||
*/ |
|||
public static String formatXML(String xml) { |
|||
String requestXML = null; |
|||
try { |
|||
// 拿取解析器
|
|||
SAXReader reader = new SAXReader(); |
|||
Document document = reader.read(new StringReader(xml)); |
|||
if (null != document) { |
|||
StringWriter stringWriter = new StringWriter(); |
|||
// 格式化,每一级前的空格
|
|||
OutputFormat format = new OutputFormat(" ", true); |
|||
// xml声明与内容是否添加空行
|
|||
format.setNewLineAfterDeclaration(false); |
|||
// 是否设置xml声明头部
|
|||
format.setSuppressDeclaration(false); |
|||
// 是否分行
|
|||
format.setNewlines(true); |
|||
XMLWriter writer = new XMLWriter(stringWriter, format); |
|||
writer.write(document); |
|||
writer.flush(); |
|||
writer.close(); |
|||
requestXML = stringWriter.getBuffer().toString(); |
|||
} |
|||
return requestXML; |
|||
} catch (Exception e) { |
|||
logger.error("格式化xml,失败 --> {}", e); |
|||
return null; |
|||
} |
|||
} |
|||
} |
|||
|
@ -0,0 +1,109 @@ |
|||
server: |
|||
port: @server.port@ |
|||
servlet: |
|||
context-path: /epmet/third/platform |
|||
|
|||
spring: |
|||
main: |
|||
allow-bean-definition-overriding: true |
|||
application: |
|||
name: epmet-third-platform-server |
|||
#环境 dev|test|prod |
|||
profiles: |
|||
active: dev |
|||
jackson: |
|||
time-zone: GMT+8 |
|||
date-format: yyyy-MM-dd HH:mm:ss |
|||
redis: |
|||
database: @spring.redis.index@ |
|||
host: @spring.redis.host@ |
|||
port: @spring.redis.port@ |
|||
password: @spring.redis.password@ |
|||
timeout: 30s |
|||
datasource: |
|||
druid: |
|||
#MySQL |
|||
driver-class-name: com.mysql.cj.jdbc.Driver |
|||
url: @spring.datasource.druid.url@ |
|||
username: @spring.datasource.druid.username@ |
|||
password: @spring.datasource.druid.password@ |
|||
cloud: |
|||
nacos: |
|||
discovery: |
|||
server-addr: @nacos.server-addr@ |
|||
#nacos的命名空间ID,默认是public |
|||
namespace: @nacos.discovery.namespace@ |
|||
#不把自己注册到注册中心的地址 |
|||
register-enabled: @nacos.register-enabled@ |
|||
ip: @nacos.ip@ |
|||
config: |
|||
enabled: @nacos.config-enabled@ |
|||
server-addr: @nacos.server-addr@ |
|||
namespace: @nacos.config.namespace@ |
|||
group: @nacos.config.group@ |
|||
file-extension: yaml |
|||
# 数据迁移工具flyway |
|||
flyway: |
|||
enabled: @spring.flyway.enabled@ |
|||
locations: classpath:db/migration |
|||
url: @spring.datasource.druid.url@ |
|||
user: @spring.datasource.druid.username@ |
|||
password: @spring.datasource.druid.password@ |
|||
baseline-on-migrate: true |
|||
baseline-version: 0 |
|||
management: |
|||
endpoints: |
|||
web: |
|||
exposure: |
|||
include: "*" |
|||
endpoint: |
|||
health: |
|||
show-details: ALWAYS |
|||
|
|||
mybatis-plus: |
|||
mapper-locations: classpath:/mapper/**/*.xml |
|||
#实体扫描,多个package用逗号或者分号分隔 |
|||
typeAliasesPackage: com.epmet.entity |
|||
global-config: |
|||
#数据库相关配置 |
|||
db-config: |
|||
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID"; |
|||
id-type: ID_WORKER |
|||
#字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断" |
|||
field-strategy: NOT_NULL |
|||
#驼峰下划线转换 |
|||
column-underline: true |
|||
banner: false |
|||
#原生配置 |
|||
configuration: |
|||
map-underscore-to-camel-case: true |
|||
cache-enabled: false |
|||
call-setters-on-nulls: true |
|||
jdbc-type-for-null: 'null' |
|||
|
|||
feign: |
|||
hystrix: |
|||
enabled: true |
|||
client: |
|||
config: |
|||
default: |
|||
loggerLevel: BASIC |
|||
httpclient: |
|||
enabled: true |
|||
|
|||
hystrix: |
|||
command: |
|||
default: |
|||
execution: |
|||
isolation: |
|||
thread: |
|||
timeoutInMilliseconds: 60000 #缺省为1000 |
|||
|
|||
ribbon: |
|||
ReadTimeout: 300000 |
|||
ConnectTimeout: 300000 |
|||
|
|||
#pageHelper分页插件 |
|||
pagehelper: |
|||
helper-dialect: mysql |
|||
reasonable: false #分页合理化配置,例如输入页码为-1,则自动转化为最小页码1 |
@ -0,0 +1,164 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<configuration> |
|||
<include resource="org/springframework/boot/logging/logback/base.xml"/> |
|||
|
|||
<property name="log.path" value="logs/message"/> |
|||
|
|||
<springProperty scope="context" name="appname" source="spring.application.name"/> |
|||
|
|||
<!-- 日志上下文名称 --> |
|||
<contextName>${appname}</contextName> |
|||
|
|||
<!-- 彩色日志格式 --> |
|||
<property name="CONSOLE_LOG_PATTERN" |
|||
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
|||
|
|||
<!--1. 输出到控制台--> |
|||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|||
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息--> |
|||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
|||
<level>debug</level> |
|||
</filter> |
|||
<encoder> |
|||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> |
|||
<!-- 设置字符集 --> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
</appender> |
|||
|
|||
<!--2. 输出到文档--> |
|||
<!-- 2.1 level为 DEBUG 日志,时间滚动输出 --> |
|||
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/debug.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 日志归档 --> |
|||
<fileNamePattern>${log.path}/debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录debug级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>debug</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 2.2 level为 INFO 日志,时间滚动输出 --> |
|||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/info.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<!-- 每天日志归档路径以及格式 --> |
|||
<fileNamePattern>${log.path}/info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录info级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>info</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 2.3 level为 WARN 日志,时间滚动输出 --> |
|||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/warn.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${log.path}/warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录warn级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>warn</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 2.4 level为 ERROR 日志,时间滚动输出 --> |
|||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|||
<!-- 正在记录的日志文档的路径及文档名 --> |
|||
<file>${log.path}/error.log</file> |
|||
<!--日志文档输出格式--> |
|||
<encoder> |
|||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%contextName] [%thread] %-5level %logger{50} - %msg%n</pattern> |
|||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|||
</encoder> |
|||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|||
<fileNamePattern>${log.path}/error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|||
<maxFileSize>100MB</maxFileSize> |
|||
</timeBasedFileNamingAndTriggeringPolicy> |
|||
<!--日志文档保留天数--> |
|||
<maxHistory>15</maxHistory> |
|||
</rollingPolicy> |
|||
<!-- 此日志文档只记录ERROR级别的 --> |
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|||
<level>ERROR</level> |
|||
<onMatch>ACCEPT</onMatch> |
|||
<onMismatch>DENY</onMismatch> |
|||
</filter> |
|||
</appender> |
|||
|
|||
<!-- 开发、测试环境 --> |
|||
<springProfile name="dev,test"> |
|||
<logger name="org.springframework.web" level="INFO"/> |
|||
<logger name="org.springboot.sample" level="INFO"/> |
|||
<logger name="com.epmet.dao" level="INFO"/> |
|||
<logger name="com.epmet.dao" level="DEBUG"/> |
|||
<root level="INFO"> |
|||
<appender-ref ref="DEBUG_FILE"/> |
|||
<appender-ref ref="INFO_FILE"/> |
|||
<appender-ref ref="WARN_FILE"/> |
|||
<appender-ref ref="ERROR_FILE"/> |
|||
</root> |
|||
</springProfile> |
|||
|
|||
<!-- 生产环境 --> |
|||
<springProfile name="prod"> |
|||
<logger name="org.springframework.web" level="INFO"/> |
|||
<logger name="org.springboot.sample" level="INFO"/> |
|||
<logger name="com.epmet.dao" level="INFO"/> |
|||
<root level="INFO"> |
|||
<appender-ref ref="CONSOLE"/> |
|||
<appender-ref ref="DEBUG_FILE"/> |
|||
<appender-ref ref="INFO_FILE"/> |
|||
<appender-ref ref="WARN_FILE"/> |
|||
<appender-ref ref="ERROR_FILE"/> |
|||
</root> |
|||
</springProfile> |
|||
|
|||
</configuration> |
@ -0,0 +1,51 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
|||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> |
|||
<output url="file://$MODULE_DIR$/target/classes" /> |
|||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> |
|||
<content url="file://$MODULE_DIR$"> |
|||
<excludeFolder url="file://$MODULE_DIR$/target" /> |
|||
</content> |
|||
<orderEntry type="inheritedJdk" /> |
|||
<orderEntry type="sourceFolder" forTests="false" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-context:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-aop:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-beans:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-expression:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.slf4j:jul-to-slf4j:1.7.29" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.yaml:snakeyaml:1.23" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.11.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.slf4j:slf4j-api:1.7.29" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.9.16" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.16" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-core:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-jcl:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.12.RELEASE" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" /> |
|||
<orderEntry type="library" scope="TEST" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" /> |
|||
</component> |
|||
</module> |
@ -0,0 +1,21 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<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> |
|||
<artifactId>epmet-module</artifactId> |
|||
<groupId>com.epmet</groupId> |
|||
<version>2.0.0</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
|
|||
<artifactId>epmet-third-platform</artifactId> |
|||
<packaging>pom</packaging> |
|||
|
|||
<modules> |
|||
<module>epmet-third-platform-client</module> |
|||
<module>epmet-third-platform-server</module> |
|||
</modules> |
|||
|
|||
|
|||
</project> |
Loading…
Reference in new issue