diff --git a/ServiceSiteCommon/.gitignore b/ServiceSiteCommon/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..550c536e3cefc80abbced148f5559ed4bd230d9f --- /dev/null +++ b/ServiceSiteCommon/.gitignore @@ -0,0 +1,9 @@ +.idea +target +*.iml +logs +temp +Generator.java +.DS_Store +package-lock.json +gulp/node_modules \ No newline at end of file diff --git a/ServiceSiteCommon/facade/.gitignore b/ServiceSiteCommon/facade/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..549e00a2a96fa9d7c5dbc9859664a78d980158c2 --- /dev/null +++ b/ServiceSiteCommon/facade/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### 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/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/ServiceSiteCommon/facade/pom.xml b/ServiceSiteCommon/facade/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..e96f0cdb171e0a0c8e1f2f682d91646d0a19f398 --- /dev/null +++ b/ServiceSiteCommon/facade/pom.xml @@ -0,0 +1,63 @@ +<?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> + <groupId>com.seasky</groupId> + <artifactId>template-api</artifactId> + <version>0.0.1-SNAPSHOT</version> + <name>template-api</name> + <description>template-api project for template</description> + + <properties> + <java.version>1.8</java.version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-dependencies</artifactId> + <version>Hoxton.SR4</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>2.2.9.RELEASE</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>com.seasky</groupId> + <artifactId>core-model</artifactId> + <version>1.4.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-starter-openfeign</artifactId> + </dependency> + </dependencies> + + <distributionManagement> + <repository> + <id>releases</id> + <name>Nexus Release Repository</name> + <url>http://git.seaskysh.com.cn:8881/nexus/repository/maven-releases/</url> + </repository> + <snapshotRepository> + <id>snapshots</id> + <name>Nexus Snapshot Repository</name> + <url>http://git.seaskysh.com.cn:8881/nexus/repository/maven-snapshots/</url> + </snapshotRepository> + </distributionManagement> +</project> diff --git a/ServiceSiteCommon/facade/src/main/java/com/seasky/template/enums/TestEnum.java b/ServiceSiteCommon/facade/src/main/java/com/seasky/template/enums/TestEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..21f9711bd7d7cef4f70a258e4fd114b21d8a95da --- /dev/null +++ b/ServiceSiteCommon/facade/src/main/java/com/seasky/template/enums/TestEnum.java @@ -0,0 +1,4 @@ +package com.seasky.template.enums; + +public enum TestEnum { +} diff --git a/ServiceSiteCommon/facade/src/main/java/com/seasky/template/web/api/ITestController.java b/ServiceSiteCommon/facade/src/main/java/com/seasky/template/web/api/ITestController.java new file mode 100644 index 0000000000000000000000000000000000000000..3a8210e1a8e1147c85633e5a27f90fdbded06bfb --- /dev/null +++ b/ServiceSiteCommon/facade/src/main/java/com/seasky/template/web/api/ITestController.java @@ -0,0 +1,21 @@ +package com.seasky.template.web.api; + +import com.seasky.core.common.Result; +import com.seasky.template.web.dto.request.TestRequest; +import com.seasky.template.web.dto.result.TestResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; + +@FeignClient("template") +@RequestMapping("test") +@Api("Test") +public interface ITestController { + + @ApiOperation("1.娴嬭瘯鎺ュ彛") + @PostMapping(path = "/pc/v1/queryList") + Result<TestResult> queryList(@RequestBody TestRequest testRequest); +} diff --git a/ServiceSiteCommon/facade/src/main/java/com/seasky/template/web/dto/request/TestRequest.java b/ServiceSiteCommon/facade/src/main/java/com/seasky/template/web/dto/request/TestRequest.java new file mode 100644 index 0000000000000000000000000000000000000000..96d3b94b1ae5370f9aba3bc4cae1f11d82d573c0 --- /dev/null +++ b/ServiceSiteCommon/facade/src/main/java/com/seasky/template/web/dto/request/TestRequest.java @@ -0,0 +1,4 @@ +package com.seasky.template.web.dto.request; + +public class TestRequest { +} diff --git a/ServiceSiteCommon/facade/src/main/java/com/seasky/template/web/dto/result/TestResult.java b/ServiceSiteCommon/facade/src/main/java/com/seasky/template/web/dto/result/TestResult.java new file mode 100644 index 0000000000000000000000000000000000000000..8a2444d50edcb973fe14f3b493fb238126d7cfb4 --- /dev/null +++ b/ServiceSiteCommon/facade/src/main/java/com/seasky/template/web/dto/result/TestResult.java @@ -0,0 +1,4 @@ +package com.seasky.template.web.dto.result; + +public class TestResult { +} diff --git a/ServiceSiteCommon/pem/ca.pem b/ServiceSiteCommon/pem/ca.pem new file mode 100644 index 0000000000000000000000000000000000000000..7e7680c2e6eb7b5947163d19cd150fd0eba5b54a --- /dev/null +++ b/ServiceSiteCommon/pem/ca.pem @@ -0,0 +1,35 @@ +-----BEGIN CERTIFICATE----- +MIIF/zCCA+egAwIBAgIJAObDjzOlfG+9MA0GCSqGSIb3DQEBCwUAMIG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VUiqHmJp/rl6vcYFlySqhZRmR95KGrYAqvBnUCtl0DyW0B +AOhZBodZPR4Gl6p357kyok3GW+8ii746OBm8jEOV8dsWvcfprEXQH6SG9C5R2erw +qCLLTg3eADkCAwEAAaNQME4wHQYDVR0OBBYEFJn3uaVX9C/HKIbDBCLhHjzuSqQU +MB8GA1UdIwQYMBaAFJn3uaVX9C/HKIbDBCLhHjzuSqQUMAwGA1UdEwQFMAMBAf8w +DQYJKoZIhvcNAQELBQADggIBAKlKfABNlVZzyYfh2dEtDxki1ZX0UUjNbVov3U4f +RwRnE3BRPihXIHGMZZom2f9Mu4QMyc59YcH12nxGZB1F32t1cdtVouB2+zWJQ5ME +LCltnKYeXYiwiy9nFq7gXaCILHDeWPbb60QBhAzInKaEHQPyTQ9VWq0YgpEdikY/ +8li5GaHWvr+qGV7Z4P9sBNBIWNGlehsfRC9I1WTzJilQ48b2yL9IbPNDPS2Uks59 +Vs6G375iMCBBbulz9V9aapXci196jw2Sjj71gPWPwuyM7ysmY3SbpKw0As+rg4zI +85PaCkyXXVy5aIbL2J3R36/aS99D5ZkTTh7nXY/BvV1eW5JsBjXGAslRxSgQFq3A +wC21sIzlPcamggKPuZ5mxK8UFAQexk4Y8Z0KGXBGiSiyizgDBziKuVLfYfv9ekZv +1VkR+f4OCfmzgNRzyxsHMk+Zobitj39D5n4ed80cNmJovVko3IHOK/AWgG9JLYeX +mI2AFMEAGtrwHeFa9d6zH0pxkpmJAq1XeDJpuiK5k2OKNOy5RGcgyoKrrlLr7//F +WFPSFIAItdODMDRFZiLRSZ0/7TXnK+uXQUQA4qPkSVj5ObNfvwModiaAWNiA8Tgu +gFDYj4+tiWI3nDXqfxcbgVrMFE15kBPcLzW41wpg+Nw0nbL3oaroUKyKP8uYBUYq +Sktc +-----END CERTIFICATE----- diff --git a/ServiceSiteCommon/pem/cert.pem b/ServiceSiteCommon/pem/cert.pem new file mode 100644 index 0000000000000000000000000000000000000000..aac09cf7658c603adf04d5f6204c06286c8bd74c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m5ZU1kuhV5Ue5MPsXt1Ku6VFLPGIrEW5e/3K +U8LcdB4dOcqhjyYfVtg2/QHB1wIDAQABoy4wLDAVBgNVHREEDjAMhwQvbn92hwQA +AAAAMBMGA1UdJQQMMAoGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQA+f6ZQ +0eZF35r3PyyMDJt8SMQH92evSS6FLpcvZvZy+nNl2sMg7sYZ5WHfbD+lXADlomP+ +9qNGMhxnvJ6TqI4BZCy8YBvNuJcgLB6S2Pqv9r0/GVrYl5S+mAz3S6pYYjOXNBvF +QhFjl/acvpEfqhQsEeRmi81v/mvewYa9+TB+jaIuEqJAEz51RZ+Y8yPbxM+8cojr +K7NckEyDcwKHvbQ1WFKkeiMUyaDMoaImROuz4hv2vHz5VSaj+saAlVgM6X2RpuMn +0KumZ93r5z3xKAq1X/+xGFnHYgHD91ZXX4szvEcxjvwTOOWarNA17WRGW7AaEKEP +VLlSvBfcDPDfKXWvTEohbM0PwF3flcKqZs00JECEbw2P5nOxd5dlavLhwlgfCAaD +K1Q1gpSU6VCUufDudR4xny2rEvZjOcHsKr52zhrYZukDkwfmqJimNgMRAb7AaVfS +rZEJYB4wOEreSDLk+bIzjZyVSskKFURgSzxMmuVrnVpH10h2hyCTKhjLUgbz7GO+ +bazsOvQ6DlKoJ1RvL4sAQDuiRtIt01NC1LzJ0460pylM1OJaRLN1TsAvpF2Wr5xb +nufRi3UC+e9YMJt8pKzZIrWfAUKZ0j1tCAx+vjJR32d2hah9gKiU8xLsflEQTc78 +ck/WnIN16CKs+tct2PPX27kS4d5UhOpENngZ5A== +-----END CERTIFICATE----- diff --git a/ServiceSiteCommon/pem/key.pem b/ServiceSiteCommon/pem/key.pem new file mode 100644 index 0000000000000000000000000000000000000000..7996b1e14f20759a5e81af0aa19445385d87606b --- /dev/null +++ b/ServiceSiteCommon/pem/key.pem @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEApyggZGh8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aMPSDg06WX1b0bYFrGwS8FQMk6hB/1iFl5osrgSPzTZ/wuZPYKfBK +9+5v3VPKrYtszyCNs9VGzPOHBdEndmMPo3GUqibHQhxjwf8wNS+A6klu7FfdUje3 +BZ+fsERb/KenautJ08SjOpRwrwuxj9ZxXt2MxP9dPvbyrvqckz3LFFXkqk/gVxp2 +XoGzARLSb3ktPKo7deQXzcS3rX7r5JfKSPPwQVTfTNeRmH+930XwPSjpNOdMaNTt +UALpx8Zd0Rmsic36Qs8pKfGJWoODNQXRWJmD7F/YfUC0PnFOdP0QWhGONNyVxFoa +ah9Q2QKCAQAfTsiSEeM6rN+EjE2LuxeUB6NMNdNqr454VApbJtarumHlNLLOZn+N +UZ+CVxMmw3tX4ypYqfDZajl0QIPWjnpxE7halx4iNxGIMUkS3+p2tDSwh+BjCkaF +1Iq3fcAWOnRlRTLGgw8DRWBLY3sC3SoADueLGjpTpJfUgy83IwKhpY99qY5yaLMC +84u/vupL5/YVOca5m5fPVpGGHbM4YWpXryjAnpztndCcdE4ya3s6GJdJaMR/wmyr +bSd7azx1FOdZ/B941N3s+mty+vLxWAJsM438A11tkv9HhR78RDl4ApzHaFwNv7Gm +GSAaSTorABVAL0aQVGw+yePHWf/CVIzLAoIBAGwnQzPN4NZCLOAI8lSCFqRpCLGi +ibX1H9nZhC5CZD3bEWH7Ac5JtZX1PdyPEEDCm1AUVVohYMET5MnADCDBHKr8/4HR +UI3ZcSX45NyIAvlGQYQzT4MmSSW4q6vVt14oAJUURhXvAGCfDodabJ7qUqgv5yUG +4CTsNbUsyfhEiAanUygXirxHn5n03YDMENOmoBJxNKA1MDDvrwRK2KrAgdQnfFQP +7ws6z3yJsUvgLTLRnESEFBiKuFEYVwDatrV9oe7X+3ulWFOB5a8INNYWdTLXEkb9 +Ns+mUSarxhtoLnbKQuA5rEpLo6cEM1zgetdYaNrDWXyWT7DXVR4oEFRX40k= +-----END RSA PRIVATE KEY----- diff --git a/ServiceSiteCommon/pom.xml b/ServiceSiteCommon/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..32dc5ee66c11332c2ebd66f4cfce746b1d2dc4c2 --- /dev/null +++ b/ServiceSiteCommon/pom.xml @@ -0,0 +1,391 @@ +<?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> + <groupId>com.seasky</groupId> + <artifactId>template</artifactId> + <version>0.0.1-SNAPSHOT</version> + <name>template</name> + <description>Demo template project for Spring Boot</description> + <properties> + <java.version>1.8</java.version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <spring-boot.version>2.2.1.RELEASE</spring-boot.version> + <spring-cloud-alibaba.version>2.2.0.RELEASE</spring-cloud-alibaba.version> + <spring-cloud.version>Hoxton.SR4</spring-cloud.version> + <docker.directory>docker</docker.directory> + <docker-maven-plugin.version>0.4.10</docker-maven-plugin.version> + <heading.docker.registry>demo.seaskysh.com</heading.docker.registry> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-alibaba-dependencies</artifactId> + <version>${spring-cloud-alibaba.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>${spring-boot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-dependencies</artifactId> + <version>${spring-cloud.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <!--闇€瑕佸紩鍏ヨjar鎵嶈兘浣縝ootstrap閰嶇疆鏂囦欢鐢熸晥--> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-context</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <!-- nacos --> + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> + </dependency> + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> + </dependency> + <!-- nacos --> + <!--seasky 缁勪欢 --> + <dependency> + <groupId>com.seasky</groupId> + <artifactId>core</artifactId> + <version>1.4.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>com.seasky</groupId> + <artifactId>template-api</artifactId> + <version>0.0.1-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <optional>true</optional> + </dependency> + <!-- webService--> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web-services</artifactId> + </dependency> + <!-- CXF webservice --> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-spring-boot-starter-jaxws</artifactId> + <version>3.2.1</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-transports-http</artifactId> + <version>3.2.1</version> + </dependency> + <!-- CXF webservice --> + <!-- 鍗曞厓娴嬭瘯 --> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>5.2.9.RELEASE</version> + <scope>compile</scope> + </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> + <!-- 鏁版嵁搴� JDBC --> + <dependency> + <groupId>com.microsoft.sqlserver</groupId> + <artifactId>sqljdbc42</artifactId> + <version>6.0</version> + </dependency> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>8.0.11</version> + </dependency> + <!-- 鏁版嵁搴� JDBC --> + <!-- 鏃ュ織璁板綍SkyWalking --> + <dependency> + <groupId>org.apache.skywalking</groupId> + <artifactId>apm-toolkit-logback-1.x</artifactId> + <version>8.7.0</version> + </dependency> + <!-- 鏃ュ織璁板綍SkyWalking --> + </dependencies> + + <build> + <finalName>${project.artifactId}</finalName> + <resources> + <resource> + <directory>${basedir}/src/main/java</directory> + <includes> + <include>**/*.xml</include> + </includes> + </resource> + <resource> + <directory>${basedir}/src/main/resources</directory> + <filtering>true</filtering> + <includes> + <include>*.xml</include> + <include>*.properties</include> + <include>*.yml</include> + <include>*.conf</include> + </includes> + <excludes> + <exclude>iconfont/**</exclude> + </excludes> + </resource> + <resource> + <directory>${basedir}/src/main/resources</directory> + <filtering>false</filtering> + <includes> + <include>static/**</include> + <include>iconfont/**</include> + </includes> + </resource> + <resource> <!-- 鎸囧畾蹇呴』缂栬瘧鎵撳寘鐨勮祫婧愭枃浠� --> + <directory>${basedir}/src/main/resources/env/${env}</directory> + <targetPath>${basedir}/target/classes</targetPath> + <filtering>true</filtering> + </resource> + </resources> + <plugins> + <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.0</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + <encoding>UTF-8</encoding> + <skip>true</skip> + <!--<compilerArgs> + <arg>-extdirs</arg> + <arg>${basedir}/src/demo/static/*</arg> + </compilerArgs>--> + </configuration> + </plugin> + <!--<plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>${maven-resources-plugin}</version> + <configuration> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> + </plugin>--> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.22.2</version> + </plugin> + <plugin> + <artifactId>maven-failsafe-plugin</artifactId> + <version>2.22.2</version> + </plugin> + <plugin> <!-- war 鍖呮彃浠� --> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <configuration><!-- mainClass鍚姩绫� --> + <mainClass>com.seasky.Application</mainClass> + </configuration> + </plugin> + </plugins> + <pluginManagement> + <plugins> + <!--<plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven-compiler-plugin}</version> + <configuration> + <source>${maven.compiler.source}</source> + <target>${maven.compiler.target}</target> + <encoding>${project.build.sourceEncoding}</encoding> + </configuration> + </plugin>--> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <version>2.2.9.RELEASE</version> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> + <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-war-plugin --> + <plugin> <!-- war 鍖呮彃浠� --> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <version>3.2.2</version> + <configuration> + <failOnMissingWebXml>false</failOnMissingWebXml> + </configuration> + </plugin> + <plugin> + <groupId>com.spotify</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>1.2.2</version> + <configuration> + <dockerHost>https://47.110.127.118:2375</dockerHost> + <imageName>demo.seaskysh.com/seaskysh/${project.artifactId}:${project.version}</imageName> + <baseImage>demo.seaskysh.com/seaskypub/java</baseImage> + <maintainer>seaskysh.com</maintainer> + <workdir>/ROOT</workdir> + <cmd>["java", "-version"]</cmd> + <dockerCertPath>${project.basedir}/pem</dockerCertPath> + <entryPoint>["sh", "-c", "java $JAVA_OPTS -jar ${project.build.finalName}.jar"]</entryPoint> + <!-- 杩欓噷鏄鍒� jar 鍖呭埌 docker 瀹瑰櫒鎸囧畾鐩綍閰嶇疆 --> + <resources> + <resource> + <targetPath>/ROOT</targetPath> + <directory>${project.build.directory}</directory> + <include>${project.build.finalName}.jar</include> + </resource> + </resources> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + + <profiles> + <profile> <!-- 鏈湴寮€鍙戠幆澧� --> + <id>dev</id> + <!-- 璁剧疆榛樿婵€娲婚厤缃� --> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <properties> + <env>dev</env> + </properties> + </profile> + <profile> <!-- 娴嬭瘯鐜 --> + <id>test</id> + <properties> + <env>test</env> + </properties> + </profile> + <profile> <!-- 鐢熶骇鐜 --> + <id>prod</id> + <properties> + <env>prod</env> + </properties> + </profile> + + <!--<profile> + <id>deploy</id> + <activation> + <property> + <name>deploy</name> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <configuration> + <skip>false</skip> + </configuration> + </plugin> + </plugins> + </build> + </profile> + + <profile> + <id>docker</id> + <activation> + <property> + <name>docker</name> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>com.spotify</groupId> + <artifactId>docker-maven-plugin</artifactId> + <executions> + <execution> + <id>build-image</id> + <phase>package</phase> + <goals> + <goal>build</goal> + </goals> + <configuration> + <dockerDirectory>${project.basedir}/src/main/${docker.directory}</dockerDirectory> + <imageName>${heading.docker.registry}/seaskysh/${project.artifactId} + </imageName> <!– 闀滃儚鍚� –> + <!– <noCache>true</noCache>–><!–褰揹ocker缂撳瓨鎵ц寮傚父鏃讹紝鏀惧紑璇ラ厤缃�–> + <imageTags> + <imageTag>${project.version}</imageTag> <!– 闀滃儚tag锛屾敮鎸佸涓猼ag –> + </imageTags> + <forceTags>true</forceTags> + <labels> + <label>VERSION=${project.version}</label> + </labels> + <resources> + <resource> + <targetPath>/</targetPath> + <directory>${project.build.directory}</directory> + <!– 灏嗗埗鍝佹坊鍔犲埌docker build context –> + <include>${project.build.finalName}.jar</include> + </resource> + </resources> + </configuration> + </execution> + <execution> + <id>push-image</id> + <phase>deploy</phase> + <goals> + <goal>push</goal> + </goals> + <configuration> + <serverId>dgjbudget + </serverId> <!– 瀵瑰簲maven settings.xml鐨剆erver id –> + <imageName> + ${heading.docker.registry}/seaskysh/${project.artifactId}:${project.version} <!– 闇€瑕乸ush鍒颁粨搴撶殑闀滃儚锛岀洰鍓嶅彧鏀寔涓€涓� –> + </imageName> + <registryUrl>https://${heading.docker.registry}</registryUrl> + <retryPushCount>3</retryPushCount> + <retryPushTimeout>60</retryPushTimeout> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile>--> + + </profiles> + +</project> diff --git a/ServiceSiteCommon/settings.xml b/ServiceSiteCommon/settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..59f56d01326a69ee6f66632ba7b06f10f7e0cf84 --- /dev/null +++ b/ServiceSiteCommon/settings.xml @@ -0,0 +1,347 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<!-- + | This is the configuration file for Maven. It can be specified at two levels: + | + | 1. User Level. This settings.xml file provides configuration for a single user, + | and is normally provided in ${user.home}/.m2/settings.xml. + | + | NOTE: This location can be overridden with the CLI option: + | + | -s /path/to/user/settings.xml + | + | 2. Global Level. This settings.xml file provides configuration for all Maven + | users on a machine (assuming they're all using the same Maven + | installation). It's normally provided in + | ${maven.conf}/settings.xml. + | + | NOTE: This location can be overridden with the CLI option: + | + | -gs /path/to/global/settings.xml + | + | The sections in this sample file are intended to give you a running start at + | getting the most out of your Maven installation. Where appropriate, the default + | values (values used when the setting is not specified) are provided. + | + |--> +<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> + <!-- localRepository + | The path to the local repository maven will use to store artifacts. + | + | Default: ${user.home}/.m2/repository + --> + <localRepository>${user.home}/.m2/repository</localRepository> + + <!-- interactiveMode + | This will determine whether maven prompts you when it needs input. If set to false, + | maven will use a sensible default value, perhaps based on some other setting, for + | the parameter in question. + | + | Default: true + <interactiveMode>true</interactiveMode> + --> + + <!-- offline + | Determines whether maven should attempt to connect to the network when executing a build. + | This will have an effect on artifact downloads, artifact deployment, and others. + | + | Default: false + <offline>false</offline> + --> + + <!-- pluginGroups + | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e. + | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers + | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list. + |--> + <pluginGroups> + <!-- pluginGroup + | Specifies a further group identifier to use for plugin lookup. + <pluginGroup>com.your.plugins</pluginGroup> + --> + </pluginGroups> + + <!-- proxies + | This is a list of proxies which can be used on this machine to connect to the network. + | Unless otherwise specified (by system property or command-line switch), the first proxy + | specification in this list marked as active will be used. + |--> + <proxies> + <!-- proxy + | Specification for one proxy, to be used in connecting to the network. + | + <proxy> + <id>optional</id> + <active>true</active> + <protocol>http</protocol> + <username>proxyuser</username> + <password>proxypass</password> + <host>proxy.host.net</host> + <port>80</port> + <nonProxyHosts>local.net|some.host.com</nonProxyHosts> + </proxy> + --> + </proxies> + + <!-- servers + | This is a list of authentication profiles, keyed by the server-id used within the system. + | Authentication profiles can be used whenever maven must make a connection to a remote server. + |--> + <servers> + <!-- server + | Specifies the authentication information to use when connecting to a particular server, identified by + | a unique name within the system (referred to by the 'id' attribute below). + | + | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are + | used together. + | + --> + + <server> + <id>releases</id> + <username>admin</username> + <password>Seaskysh@dev2019</password> + </server> + + <server> + <id>snapshots</id> + <username>admin</username> + <password>Seaskysh@dev2019</password> + </server> + + <server> + <id>nexus</id> + <username>admin</username> + <password>Seaskysh@dev2019</password> + </server> + + <server> + <id>SeaskyMirror</id> + <username>admin</username> + <password>Seaskysh@dev2019</password> + </server> + + + <!-- Another sample, using keys to authenticate. + <server> + <id>siteServer</id> + <privateKey>/path/to/private/key</privateKey> + <passphrase>optional; leave empty if not used.</passphrase> + </server> + --> + </servers> + + <!-- mirrors + | This is a list of mirrors to be used in downloading artifacts from remote repositories. + | + | It works like this: a POM may declare a repository to use in resolving certain artifacts. + | However, this repository may have problems with heavy traffic at times, so people have mirrored + | it to several places. + | + | That repository definition will have a unique id, so we can create a mirror reference for that + | repository, to be used as an alternate download site. The mirror site will be the preferred + | server for that repository. + |--> + <mirrors> + <!-- mirror + | Specifies a repository mirror site to use instead of a given repository. The repository that + | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used + | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. + | + --> + <mirror> + <id>SeaskyMirror</id> + <mirrorOf>*</mirrorOf> + <name>Seasky Repository Mirror.</name> + <url>http://git.seaskysh.com.cn:8881/nexus/repository/maven-public/</url> + </mirror> + + </mirrors> + + <!-- profiles + | This is a list of profiles which can be activated in a variety of ways, and which can modify + | the build process. Profiles provided in the settings.xml are intended to provide local machine- + | specific paths and repository locations which allow the build to work in the local environment. + | + | For example, if you have an integration testing plugin - like cactus - that needs to know where + | your Tomcat instance is installed, you can provide a variable here such that the variable is + | dereferenced during the build process to configure the cactus plugin. + | + | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles + | section of this document (settings.xml) - will be discussed later. Another way essentially + | relies on the detection of a system property, either matching a particular value for the property, + | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a + | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'. + | Finally, the list of active profiles can be specified directly from the command line. + | + | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact + | repositories, plugin repositories, and free-form properties to be used as configuration + | variables for plugins in the POM. + | + |--> + <profiles> + <profile> + <id>Seasky</id> + <repositories> + <repository> + <id>nexus</id> + <name>Public Repositories</name> + <url>http://git.seaskysh.com.cn:8881/nexus/repository/maven-public/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + </snapshots> + </repository> + + <repository> + <id>central</id> + <name>Central Repositories</name> + <url>http://git.seaskysh.com.cn:8881/nexus/repository/maven-central/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + </snapshots> + </repository> + + <repository> + <id>releases</id> + <name>Release Repositories</name> + <url>http://git.seaskysh.com.cn:8881/nexus/repository/maven-releases/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + </snapshots> + </repository> + + <repository> + <id>snapshots</id> + <name>Snapshot Repositories</name> + <url>http://git.seaskysh.com.cn:8881/nexus/repository/maven-snapshots/</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + <updatePolicy>always</updatePolicy> + </snapshots> + </repository> + </repositories> + + <pluginRepositories> + <pluginRepository> + <id>plugins</id> + <name>Plugin Repositories</name> + <url>http://git.seaskysh.com.cn:8881/nexus/repository/maven-public/</url> + </pluginRepository> + </pluginRepositories> + </profile> + <!-- profile + | Specifies a set of introductions to the build process, to be activated using one or more of the + | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/> + | or the command line, profiles have to have an ID that is unique. + | + | An encouraged best practice for profile identification is to use a consistent naming convention + | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc. + | This will make it more intuitive to understand what the set of introduced profiles is attempting + | to accomplish, particularly when you only have a list of profile id's for debug. + | + | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo. + <profile> + <id>jdk-1.4</id> + + <activation> + <jdk>1.4</jdk> + </activation> + + <repositories> + <repository> + <id>jdk14</id> + <name>Repository for JDK 1.4 builds</name> + <url>http://www.myhost.com/maven/jdk14</url> + <layout>default</layout> + <snapshotPolicy>always</snapshotPolicy> + </repository> + </repositories> + </profile> + --> + + <!-- + | Here is another profile, activated by the system property 'target-env' with a value of 'dev', + | which provides a specific path to the Tomcat instance. To use this, your plugin configuration + | might hypothetically look like: + | + | ... + | <plugin> + | <groupId>org.myco.myplugins</groupId> + | <artifactId>myplugin</artifactId> + | + | <configuration> + | <tomcatLocation>${tomcatPath}</tomcatLocation> + | </configuration> + | </plugin> + | ... + | + | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to + | anything, you could just leave off the <value/> inside the activation-property. + | + <profile> + <id>env-dev</id> + + <activation> + <property> + <name>target-env</name> + <value>dev</value> + </property> + </activation> + + <properties> + <tomcatPath>/path/to/tomcat/instance</tomcatPath> + </properties> + </profile> + --> + </profiles> + + <!-- activeProfiles + | List of profiles that are active for all builds. + | + <activeProfiles> + <activeProfile>alwaysActiveProfile</activeProfile> + <activeProfile>anotherAlwaysActiveProfile</activeProfile> + </activeProfiles> + --> + + <activeProfiles> + <activeProfile>Seasky</activeProfile> + </activeProfiles> + +</settings> \ No newline at end of file diff --git a/ServiceSiteCommon/src/main/java/com/seasky/Application.java b/ServiceSiteCommon/src/main/java/com/seasky/Application.java new file mode 100644 index 0000000000000000000000000000000000000000..a3456b843e8d2f192f2ac25b14749a7c9bdd9cda --- /dev/null +++ b/ServiceSiteCommon/src/main/java/com/seasky/Application.java @@ -0,0 +1,27 @@ +package com.seasky; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.EnableAspectJAutoProxy; +import org.springframework.scheduling.annotation.EnableAsync; + +/*** + * @author bandi + * */ +@SpringBootApplication +@EnableAspectJAutoProxy(exposeProxy = true) +@EnableDiscoveryClient +@EnableFeignClients(basePackages = { + "com.seasky.some-api" + ,"com.seasky.other-api" +}) +@EnableAsync +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} diff --git a/ServiceSiteCommon/src/main/java/com/seasky/template/business/api/TestService.java b/ServiceSiteCommon/src/main/java/com/seasky/template/business/api/TestService.java new file mode 100644 index 0000000000000000000000000000000000000000..f0cddad3255421fc16f2339e8782c8ce931e223e --- /dev/null +++ b/ServiceSiteCommon/src/main/java/com/seasky/template/business/api/TestService.java @@ -0,0 +1,7 @@ +package com.seasky.template.business.api; + +import com.seasky.core.base.BaseService; +import com.seasky.template.business.entity.Test; + +public interface TestService extends BaseService<Test> { +} diff --git a/ServiceSiteCommon/src/main/java/com/seasky/template/business/dao/mapper/TestMapper.java b/ServiceSiteCommon/src/main/java/com/seasky/template/business/dao/mapper/TestMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..9b3ae0b2ad92d785cd744353d9f4aff9ee40c296 --- /dev/null +++ b/ServiceSiteCommon/src/main/java/com/seasky/template/business/dao/mapper/TestMapper.java @@ -0,0 +1,7 @@ +package com.seasky.template.business.dao.mapper; + +import com.seasky.core.base.BaseMapper; +import com.seasky.template.business.entity.Test; + +public interface TestMapper extends BaseMapper<Test> { +} diff --git a/ServiceSiteCommon/src/main/java/com/seasky/template/business/dao/xml/TestMapper.xml b/ServiceSiteCommon/src/main/java/com/seasky/template/business/dao/xml/TestMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..6c2fe0b4d1f4ffcdcd94920cb575f419021b241e --- /dev/null +++ b/ServiceSiteCommon/src/main/java/com/seasky/template/business/dao/xml/TestMapper.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.seasky.template.business.dao.mapper.TestMapper"> + + <select id="selectIdPage" resultType="java.lang.Long" useCache="false"> + select id from t_test + <where> + available = 'YES' + <if test="cm.name != null and cm.name != ''"> + and name like concat('%', #{cm.name}, '%') ESCAPE '/' + </if> + </where> + </select> + +</mapper> diff --git a/ServiceSiteCommon/src/main/java/com/seasky/template/business/entity/Test.java b/ServiceSiteCommon/src/main/java/com/seasky/template/business/entity/Test.java new file mode 100644 index 0000000000000000000000000000000000000000..580134857910a12c3b024b4bac49a4fab2f4d47b --- /dev/null +++ b/ServiceSiteCommon/src/main/java/com/seasky/template/business/entity/Test.java @@ -0,0 +1,18 @@ +package com.seasky.template.business.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.seasky.core.base.BaseModel; +import io.swagger.annotations.ApiModel; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.experimental.Accessors; + +@Data +@TableName("t_test") +@AllArgsConstructor +@Accessors(chain = true) +@Builder +@ApiModel(value = "娴嬭瘯瀹炰綋") +public class Test extends BaseModel { +} diff --git a/ServiceSiteCommon/src/main/java/com/seasky/template/business/service/TestServiceImpl.java b/ServiceSiteCommon/src/main/java/com/seasky/template/business/service/TestServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..91b998ad3ac8dd34a2558633638055ef56a7ec1a --- /dev/null +++ b/ServiceSiteCommon/src/main/java/com/seasky/template/business/service/TestServiceImpl.java @@ -0,0 +1,11 @@ +package com.seasky.template.business.service; + +import com.seasky.core.base.AbstractService; +import com.seasky.template.business.api.TestService; +import com.seasky.template.business.dao.mapper.TestMapper; +import com.seasky.template.business.entity.Test; +import org.springframework.stereotype.Service; + +@Service +public class TestServiceImpl extends AbstractService<Test, TestMapper> implements TestService { +} diff --git a/ServiceSiteCommon/src/main/java/com/seasky/template/shiro/Realm.java b/ServiceSiteCommon/src/main/java/com/seasky/template/shiro/Realm.java new file mode 100644 index 0000000000000000000000000000000000000000..6e0b4b1c607231c45da53f42b0f4cb6c582e1562 --- /dev/null +++ b/ServiceSiteCommon/src/main/java/com/seasky/template/shiro/Realm.java @@ -0,0 +1,22 @@ +package com.seasky.template.shiro; + +import org.apache.shiro.authc.AuthenticationException; +import org.apache.shiro.authc.AuthenticationInfo; +import org.apache.shiro.authc.AuthenticationToken; +import org.apache.shiro.authz.AuthorizationInfo; +import org.apache.shiro.realm.AuthorizingRealm; +import org.apache.shiro.subject.PrincipalCollection; +import org.springframework.stereotype.Component; + +@Component +public class Realm extends AuthorizingRealm { + @Override + protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) { + return null; + } + + @Override + protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException { + return null; + } +} diff --git a/ServiceSiteCommon/src/main/java/com/seasky/template/web/controller/TestController.java b/ServiceSiteCommon/src/main/java/com/seasky/template/web/controller/TestController.java new file mode 100644 index 0000000000000000000000000000000000000000..288fb0bc07fb2c05c588976fa1404bf4b80739b8 --- /dev/null +++ b/ServiceSiteCommon/src/main/java/com/seasky/template/web/controller/TestController.java @@ -0,0 +1,30 @@ +package com.seasky.template.web.controller; + +import com.seasky.core.base.BaseController; +import com.seasky.core.common.ResponseCode; +import com.seasky.core.common.Result; +import com.seasky.core.ddd.utils.MapperUtils; +import com.seasky.template.business.api.TestService; +import com.seasky.template.business.entity.Test; +import com.seasky.template.web.api.ITestController; +import com.seasky.template.web.dto.request.TestRequest; +import com.seasky.template.web.dto.result.TestResult; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +import static com.seasky.core.common.Response.ok; + +@RestController +@RequestMapping("test") +@Slf4j +public class TestController extends BaseController<Test, TestService> implements ITestController { + + @Override + public Result<TestResult> queryList(TestRequest testRequest) { + List<Test> testList = service.list(MapperUtils.INSTANCE.map(Test.class, testRequest)); + return ok(ResponseCode.SUCCESS, MapperUtils.INSTANCE.mapAsList(TestResult.class, testList)); + } +} diff --git a/ServiceSiteCommon/src/main/java/lombok.config b/ServiceSiteCommon/src/main/java/lombok.config new file mode 100644 index 0000000000000000000000000000000000000000..8e37527a927dbd888d6f94d30ffd32395bb97676 --- /dev/null +++ b/ServiceSiteCommon/src/main/java/lombok.config @@ -0,0 +1,2 @@ +config.stopBubbling=true +lombok.equalsAndHashCode.callSuper=call \ No newline at end of file diff --git a/ServiceSiteCommon/src/main/resources/application-dev.properties b/ServiceSiteCommon/src/main/resources/application-dev.properties new file mode 100644 index 0000000000000000000000000000000000000000..d7c63f5c05128882315ae2b5d40215e0d2ecb797 --- /dev/null +++ b/ServiceSiteCommon/src/main/resources/application-dev.properties @@ -0,0 +1,40 @@ +spring.redis.host=47.110.127.118 +spring.redis.port=6379 +spring.redis.password=123456 +spring.redis.database=0 +spring.redis.lettuce.pool.max-active=50 +spring.redis.lettuce.pool.max-idle=20 +spring.redis.lettuce.pool.min-idle=10 +spring.redis.lettuce.pool.max-wait=5000 +spring.redis.lettuce.pool.time-between-eviction-runs=600000 + +spring.datasource.druid.write.name=write +spring.datasource.druid.write.url=jdbc:mysql://47.111.224.180:8306/DDDTest?characterEncoding=utf-8&useSSL=false&&serverTimezone=GMT +spring.datasource.druid.write.username=root +spring.datasource.druid.write.password=12345678 +spring.datasource.druid.write.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.druid.write.initial-size=1 +spring.datasource.druid.write.min-idle=1 +spring.datasource.druid.write.max-active=5 +spring.datasource.druid.write.validation-query=SELECT 1 +spring.datasource.druid.write.validation-query-timeout=1 +spring.datasource.druid.write.test-while-idle=true +spring.datasource.druid.write.test-on-borrow=true +spring.datasource.druid.write.test-on-return=false +spring.datasource.druid.write.keep-alive=true +spring.datasource.druid.read.name=read +spring.datasource.druid.read.url=jdbc:mysql://47.111.224.180:8306/DDDTest?characterEncoding=utf-8&useSSL=false&&serverTimezone=GMT +spring.datasource.druid.read.username=root +spring.datasource.druid.read.password=12345678 +spring.datasource.druid.read.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.druid.read.initial-size=1 +spring.datasource.druid.read.min-idle=1 +spring.datasource.druid.read.max-active=5 +spring.datasource.druid.read.validation-query=SELECT 1 +spring.datasource.druid.read.validation-query-timeout=1 +spring.datasource.druid.read.test-while-idle=true +spring.datasource.druid.read.test-on-borrow=true +spring.datasource.druid.read.test-on-return=false +spring.datasource.druid.read.keep-alive=true + + diff --git a/ServiceSiteCommon/src/main/resources/application-prod.properties b/ServiceSiteCommon/src/main/resources/application-prod.properties new file mode 100644 index 0000000000000000000000000000000000000000..751a9f226d5f50ad517d82c3a9b87b76688a9242 --- /dev/null +++ b/ServiceSiteCommon/src/main/resources/application-prod.properties @@ -0,0 +1,42 @@ +spring.redis.host=47.111.224.180 +spring.redis.port=6379 +spring.redis.password=123456 +spring.redis.database=1 + +spring.redis.lettuce.pool.max-active=50 +spring.redis.lettuce.pool.max-idle=20 +spring.redis.lettuce.pool.min-idle=10 +spring.redis.lettuce.pool.max-wait=5000 +spring.redis.lettuce.pool.time-between-eviction-runs=600000 +spring.datasource.druid.write.name=write +spring.datasource.druid.write.url=jdbc:mysql://47.111.224.180:8306;Databasename=DDDTest +spring.datasource.druid.write.username=root +spring.datasource.druid.write.password=12345678 +spring.datasource.druid.write.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.druid.write.initial-size=1 +spring.datasource.druid.write.min-idle=1 +spring.datasource.druid.write.max-active=5 +spring.datasource.druid.write.validation-query=SELECT 1 +spring.datasource.druid.write.validation-query-timeout=1 +spring.datasource.druid.write.test-while-idle=true +spring.datasource.druid.write.test-on-borrow=true +spring.datasource.druid.write.test-on-return=false +spring.datasource.druid.write.keep-alive=true +spring.datasource.druid.read.name=read +spring.datasource.druid.read.url=jdbc:mysql://47.111.224.180:8306;Databasename=DDDTest +spring.datasource.druid.read.username=root +spring.datasource.druid.read.password=12345678 +spring.datasource.druid.read.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.druid.read.initial-size=1 +spring.datasource.druid.read.min-idle=1 +spring.datasource.druid.read.max-active=5 +spring.datasource.druid.read.validation-query=SELECT 1 +spring.datasource.druid.read.validation-query-timeout=1 +spring.datasource.druid.read.test-while-idle=true +spring.datasource.druid.read.test-on-borrow=true +spring.datasource.druid.read.test-on-return=false +spring.datasource.druid.read.keep-alive=true +swagger.enabled=true +seasky.filePath=/usr/local +seasky.fileProxyUrl=http://47.111.224.180:8306 +seasky.runEnv=prod \ No newline at end of file diff --git a/ServiceSiteCommon/src/main/resources/application-test.properties b/ServiceSiteCommon/src/main/resources/application-test.properties new file mode 100644 index 0000000000000000000000000000000000000000..5b885ae0e1effc5e5330c36dbe29d5235ccb35bd --- /dev/null +++ b/ServiceSiteCommon/src/main/resources/application-test.properties @@ -0,0 +1,38 @@ +spring.redis.host=47.110.127.118 +spring.redis.port=6379 +spring.redis.password=123456 +spring.redis.database=15 +spring.redis.lettuce.pool.max-active=50 +spring.redis.lettuce.pool.max-idle=20 +spring.redis.lettuce.pool.min-idle=10 +spring.redis.lettuce.pool.max-wait=5000 +spring.redis.lettuce.pool.time-between-eviction-runs=600000 + +spring.datasource.druid.write.name=write +spring.datasource.druid.write.url=jdbc:mysql://47.111.224.180:8306;Databasename=DDDTest +spring.datasource.druid.write.username=root +spring.datasource.druid.write.password=12345678 +spring.datasource.druid.write.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.druid.write.initial-size=1 +spring.datasource.druid.write.min-idle=1 +spring.datasource.druid.write.max-active=5 +spring.datasource.druid.write.validation-query=SELECT 1 +spring.datasource.druid.write.validation-query-timeout=1 +spring.datasource.druid.write.test-while-idle=true +spring.datasource.druid.write.test-on-borrow=true +spring.datasource.druid.write.test-on-return=false +spring.datasource.druid.write.keep-alive=true +spring.datasource.druid.read.name=read +spring.datasource.druid.read.url=jdbc:mysql://47.111.224.180:8306;Databasename=DDDTest +spring.datasource.druid.read.username=root +spring.datasource.druid.read.password=12345678 +spring.datasource.druid.read.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.druid.read.initial-size=1 +spring.datasource.druid.read.min-idle=1 +spring.datasource.druid.read.max-active=5 +spring.datasource.druid.read.validation-query=SELECT 1 +spring.datasource.druid.read.validation-query-timeout=1 +spring.datasource.druid.read.test-while-idle=true +spring.datasource.druid.read.test-on-borrow=true +spring.datasource.druid.read.test-on-return=false +spring.datasource.druid.read.keep-alive=true \ No newline at end of file diff --git a/ServiceSiteCommon/src/main/resources/application.properties b/ServiceSiteCommon/src/main/resources/application.properties new file mode 100644 index 0000000000000000000000000000000000000000..8a1f97bb5749cb9abf77ace7983f8e00e80ac666 --- /dev/null +++ b/ServiceSiteCommon/src/main/resources/application.properties @@ -0,0 +1,34 @@ +spring.application.name=template +spring.profiles.active=@env@ +server.port=8011 +swagger.enable=true + +mybatis-plus.global-config.db-config.db-type=mysql +mybatis-plus.global-config.db-config.id-type=assign_id +mybatis-plus.global-config.db-config.logic-delete-field=available +mybatis-plus.global-config.db-config.logic-delete-value='NO' +mybatis-plus.global-config.db-config.logic-not-delete-value='YES' +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.slf4j.Slf4jImpl +mybatis-plus.configuration.call-setters-on-nulls=true +mybatis-plus.configuration.cache-enabled=false +mybatis-plus.configuration.default-enum-type-handler=org.apache.ibatis.type.EnumTypeHandler + +seasky.sessionTimeout=1800 +seasky.redislockExpire=300 +seasky.projectVersion=1.0.0 +seasky.cacheName=redis + + +# 配置 DruidStatViewServlet +spring.datasource.druid.stat-view-servlet.enabled=true +spring.datasource.druid.stat-view-servlet.url-pattern=/druid/* +# IP白名单(没有配置默认为127.0.0.1) +spring.datasource.druid.stat-view-servlet.allow=127.0.0.1 +# IP黑名单 (存在共同时,deny优先于allow) +# spring.datasource.druid.deny=192.168.1.73 +# 禁用HTML页面上的“Reset All”功能 +spring.datasource.druid.stat-view-servlet.reset-enable=false +# druid 监控平台登录名 +spring.datasource.druid.stat-view-servlet.login-username=druid +# druid 监控平台登录密码 +spring.datasource.druid.stat-view-servlet.login-password=druid diff --git a/ServiceSiteCommon/src/main/resources/bootstrap.yml b/ServiceSiteCommon/src/main/resources/bootstrap.yml new file mode 100644 index 0000000000000000000000000000000000000000..737a42b0a5deefa12c2af4d316662fe2216d440c --- /dev/null +++ b/ServiceSiteCommon/src/main/resources/bootstrap.yml @@ -0,0 +1,24 @@ +seasky: + version: @version@ +server: + port: 8011 +spring: + main: + allow-bean-definition-overriding: true + application: + name: template + profiles: + active: dev + cloud: + nacos: + discovery: + server-addr: 192.168.1.80:8848 + config: + server-addr: 192.168.1.80:8848 + file-extension: properties + inetutils: + preferred-networks: + - 10.0.8 + + + diff --git a/ServiceSiteCommon/src/main/resources/ehcache.xml b/ServiceSiteCommon/src/main/resources/ehcache.xml new file mode 100644 index 0000000000000000000000000000000000000000..450573bc859ce81675ef29bf86706cfd9cc1bb2b --- /dev/null +++ b/ServiceSiteCommon/src/main/resources/ehcache.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8"?> +<eh:config + xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' + xmlns:eh='http://www.ehcache.org/v3' + xsi:schemaLocation="http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.3.xsd"> + <!--鎸囧畾缂撳瓨鐩綍--> +<!-- <eh:persistence directory="/tmp/cfa-cache-data/basedata"/>--> + + <!--缂撳瓨妯℃澘--> + <eh:cache-template name="default"> + <eh:key-type serializer="org.ehcache.impl.serialization.CompactJavaSerializer"> + java.io.Serializable + </eh:key-type> + <eh:value-type serializer="org.ehcache.impl.serialization.CompactJavaSerializer"> + java.io.Serializable + </eh:value-type> + <eh:expiry> + <eh:ttl unit="seconds">600</eh:ttl> + </eh:expiry> + <eh:resources> + <!--鍫嗗唴鍐呭瓨鍙互鏀�2000涓潯鐩紝瓒呭嚭閮ㄥ垎鍫嗗100MB--> + <eh:heap unit="entries">2000</eh:heap> + <eh:offheap unit="MB">10</eh:offheap> + </eh:resources> + </eh:cache-template> + + <!-- <!–瀹為檯鐨勭紦瀛樺尯闂达紝缁ф壙浜哾efault缂撳瓨妯℃澘,cfa 瀹屽叏浣跨敤妯℃澘榛樿–>--> + <!-- <eh:cache alias="cfa" uses-template="default">--> + + <!-- </eh:cache>--> + + <!--涓嬮潰涓や釜缁ф壙浜哾efault缂撳瓨妯℃澘锛屼絾瑕嗙洊浜嗙紦瀛樼殑杩囨湡鏃堕棿--> + <!-- session缂撳瓨 --> + <eh:cache alias="authority" uses-template="default"> + <eh:expiry> + <eh:ttl unit="hours">1</eh:ttl> + </eh:expiry> + </eh:cache> + + <!-- <!– oauth2缂撳瓨 –>--> + <!-- <eh:cache alias="oauth2" uses-template="default">--> + <!-- <eh:expiry>--> + <!-- <eh:ttl unit="hours">1</eh:ttl>--> + <!-- </eh:expiry>--> + <!-- </eh:cache>--> + + <!-- <!– session缂撳瓨 –>--> + <!-- <eh:cache alias="login" uses-template="default">--> +<!-- <eh:expiry>--> +<!-- <eh:ttl unit="minutes">30</eh:ttl>--> +<!-- </eh:expiry>--> +<!-- </eh:cache>--> + + <!-- 涓氬姟鏁版嵁缂撳瓨 --> + <eh:cache alias="service" uses-template="default"> + <eh:expiry> + <eh:ttl unit="minutes">600</eh:ttl> + </eh:expiry> + <eh:resources> + <!--鍫嗗唴鍐呭瓨鍙互鏀�2000涓潯鐩紝瓒呭嚭閮ㄥ垎鍫嗗2GB--> + <eh:heap unit="entries">2000</eh:heap> + <eh:offheap unit="MB">10</eh:offheap> + </eh:resources> + </eh:cache> +</eh:config> \ No newline at end of file diff --git a/ServiceSiteCommon/src/main/resources/logback.xml b/ServiceSiteCommon/src/main/resources/logback.xml new file mode 100644 index 0000000000000000000000000000000000000000..ae7a5201787d0714f823ea9bc347f82d32911a86 --- /dev/null +++ b/ServiceSiteCommon/src/main/resources/logback.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +-scan:褰撴灞炴€ц缃负true鏃讹紝閰嶇疆鏂囦欢濡傛灉鍙戠敓鏀瑰彉锛屽皢浼氳閲嶆柊鍔犺浇锛岄粯璁ゅ€间负true +-scanPeriod:璁剧疆鐩戞祴閰嶇疆鏂囦欢鏄惁鏈変慨鏀圭殑鏃堕棿闂撮殧锛屽鏋滄病鏈夌粰鍑烘椂闂村崟浣嶏紝榛樿鍗曚綅鏄绉掋€� +- 褰搒can涓簍rue鏃讹紝姝ゅ睘鎬х敓鏁堛€傞粯璁ょ殑鏃堕棿闂撮殧涓�1鍒嗛挓 +-debug:褰撴灞炴€ц缃负true鏃讹紝灏嗘墦鍗板嚭logback鍐呴儴鏃ュ織淇℃伅锛屽疄鏃舵煡鐪媗ogback杩愯鐘舵€併€傞粯璁ゅ€间负false銆� +- +- configuration 瀛愯妭鐐逛负 appender銆乴ogger銆乺oot +--> +<configuration scan="false" scanPeriod="60 second" debug="true"> + <property name="CONSOLE_ENCODING" value="${console.encoding:-UTF-8}"/> + <!-- 璐熻矗鍐欐棩蹇�,鎺у埗鍙版棩蹇� --> + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <!-- 涓€鏄妸鏃ュ織淇℃伅杞崲鎴愬瓧鑺傛暟缁�,浜屾槸鎶婂瓧鑺傛暟缁勫啓鍏ュ埌杈撳嚭娴� --> + <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> + <level>DEBUG</level> + </filter> + <encoder> + <pattern>%highlight(%d{HH:mm:ss.SSS} %5level %50logger{50} [%X{rid}-%X{req.remoteHost}] : %m%n)</pattern> + <charset>${CONSOLE_ENCODING}</charset> + </encoder> + </appender> + <!-- 璐熻矗鍐橢LK鏃ュ織--> +<!-- <appender name="logstash" class="net.logstash.logback.appender.LogstashTcpSocketAppender">--> +<!-- <param name="Encoding" value="UTF-8"/>--> +<!-- <destination>192.168.2.10:4560</destination>--> +<!-- <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder" >--> +<!-- <customFields>{"appname":"basedata2"}</customFields>--> +<!-- </encoder>--> +<!-- </appender>--> + + <!-- 璐熻矗鍐橲kyWalking鏃ュ織--> + <appender name="skywalking" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender"> + <!-- 鏃ュ織杈撳嚭缂栫爜 --> + <encoder> + <!--鏍煎紡鍖栬緭鍑猴細%d琛ㄧず鏃ユ湡锛�%thread琛ㄧず绾跨▼鍚嶏紝%-5level锛氱骇鍒粠宸︽樉绀�5涓瓧绗﹀搴�%msg锛氭棩蹇楁秷鎭紝%n鏄崲琛岀--> + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %50logger{50} - [%X{rid}-%X{req.remoteHost}] : %m%n</pattern> + </encoder> + </appender> + <!-- + - 鏍筶ogger + - level:璁剧疆鎵撳嵃绾у埆锛屽ぇ灏忓啓鏃犲叧锛歍RACE, DEBUG, INFO, WARN, ERROR, ALL 鍜� OFF锛屼笉鑳借缃负INHERITED鎴栬€呭悓涔夎瘝NULL銆傞粯璁ゆ槸DEBUG銆� + - appender-ref:鍙互鍖呭惈闆朵釜鎴栧涓�<appender-ref>鍏冪礌锛屾爣璇嗚繖涓猘ppender灏嗕細娣诲姞鍒拌繖涓猯ogger + --> + <root level="INFO"> + <appender-ref ref="STDOUT" /> +<!-- <appender-ref ref="logstash" />--> + <appender-ref ref="skywalking" /> + </root> + +</configuration> \ No newline at end of file diff --git a/ServiceSiteCommon/src/main/resources/shiro.properties b/ServiceSiteCommon/src/main/resources/shiro.properties new file mode 100644 index 0000000000000000000000000000000000000000..a2b2785aea5cb854a84480359a34c04227886e02 --- /dev/null +++ b/ServiceSiteCommon/src/main/resources/shiro.properties @@ -0,0 +1,20 @@ +#/**/authCode=anon +/**/login=anon +/doc.html**=anon +/webjars/**=anon +/api-docs-ext/**=anon +/swagger-resources/**=anon +/**/api-docs**=anon +/swagger-ui.html**=anon +/**/oauth2/**/token=anon +/**/register=anon +/**/setCurrent=anon +/**/getCurrent=anon +/**/listUserByAccount=anon +/**/updateFirstPassword=anon +/**/test/**=anon +/**/oauth2/**/authorize=anon +/**/oauth2/**/getLoggedInUser=anon +/**/api/**=anon +/**=anon +#/**=authc,url diff --git a/ServiceSiteCommon/src/test/java/com/seasky/template/ApplicationTests.java b/ServiceSiteCommon/src/test/java/com/seasky/template/ApplicationTests.java new file mode 100644 index 0000000000000000000000000000000000000000..4758d302f9624147de3febd3443e700e31cf4ed6 --- /dev/null +++ b/ServiceSiteCommon/src/test/java/com/seasky/template/ApplicationTests.java @@ -0,0 +1,13 @@ +package com.seasky.template; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class ApplicationTests { + + @Test + void contextLoads() { + } + +}