19 changed files with 287 additions and 0 deletions
			
			
		@ -0,0 +1,27 @@ | 
				
			|||
<?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> | 
				
			|||
        <groupId>com.esua.epdc</groupId> | 
				
			|||
        <artifactId>epdc-points</artifactId> | 
				
			|||
        <version>1.0.0</version> | 
				
			|||
    </parent> | 
				
			|||
 | 
				
			|||
    <artifactId>epdc-points-client</artifactId> | 
				
			|||
    <packaging>jar</packaging> | 
				
			|||
 | 
				
			|||
    <dependencies> | 
				
			|||
        <dependency> | 
				
			|||
            <groupId>com.esua.epdc</groupId> | 
				
			|||
            <artifactId>epdc-commons-tools</artifactId> | 
				
			|||
            <version>1.0.0</version> | 
				
			|||
        </dependency> | 
				
			|||
    </dependencies> | 
				
			|||
 | 
				
			|||
    <build> | 
				
			|||
        <finalName>${project.artifactId}</finalName> | 
				
			|||
    </build> | 
				
			|||
 | 
				
			|||
</project> | 
				
			|||
@ -0,0 +1,20 @@ | 
				
			|||
# 基础镜像 | 
				
			|||
FROM openjdk:8u242-jre-buster | 
				
			|||
# 作者 | 
				
			|||
MAINTAINER rongchao@elink-cn.com | 
				
			|||
# 对应pom.xml文件中的dockerfile-maven-plugin插件JAR_FILE的值 | 
				
			|||
ARG JAR_FILE | 
				
			|||
# 对应pom.xml文件中的dockerfile-maven-plugin插件JAR_NAME的值 | 
				
			|||
ARG JAR_NAME | 
				
			|||
# 对应pom.xml文件中的dockerfile-maven-plugin插件SERVER_PORT的值 | 
				
			|||
ARG SERVER_PORT | 
				
			|||
# 复制打包完成后的jar文件到/opt目录下 | 
				
			|||
ENV JAR_PATH /mnt/epdc/${JAR_NAME}.jar | 
				
			|||
ADD ${JAR_FILE} $JAR_PATH | 
				
			|||
# /data设为环境变量 | 
				
			|||
ENV DATAPATH /data | 
				
			|||
# 挂载/data目录到主机 | 
				
			|||
VOLUME $DATAPATH | 
				
			|||
# 启动容器时执行 | 
				
			|||
ENTRYPOINT java -jar -Xmx1024m $JAR_PATH | 
				
			|||
EXPOSE ${SERVER_PORT} | 
				
			|||
@ -0,0 +1,96 @@ | 
				
			|||
<?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> | 
				
			|||
        <groupId>com.esua.epdc</groupId> | 
				
			|||
        <artifactId>epdc-points</artifactId> | 
				
			|||
        <version>1.0.0</version> | 
				
			|||
    </parent> | 
				
			|||
 | 
				
			|||
    <artifactId>epdc-points-server</artifactId> | 
				
			|||
    <packaging>jar</packaging> | 
				
			|||
 | 
				
			|||
    <dependencies> | 
				
			|||
        <dependency> | 
				
			|||
            <groupId>com.esua.epdc</groupId> | 
				
			|||
            <artifactId>epdc-points-client</artifactId> | 
				
			|||
            <version>1.0.0</version> | 
				
			|||
        </dependency> | 
				
			|||
        <dependency> | 
				
			|||
            <groupId>com.esua.epdc</groupId> | 
				
			|||
            <artifactId>epdc-commons-tools</artifactId> | 
				
			|||
            <version>1.0.0</version> | 
				
			|||
        </dependency> | 
				
			|||
        <dependency> | 
				
			|||
            <groupId>com.esua.epdc</groupId> | 
				
			|||
            <artifactId>epdc-commons-mybatis</artifactId> | 
				
			|||
            <version>1.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>de.codecentric</groupId> | 
				
			|||
            <artifactId>spring-boot-admin-starter-client</artifactId> | 
				
			|||
            <version>${spring.boot.admin.version}</version> | 
				
			|||
        </dependency> | 
				
			|||
        <dependency> | 
				
			|||
            <groupId>com.esua.epdc</groupId> | 
				
			|||
            <artifactId>epdc-commons-tools-phone</artifactId> | 
				
			|||
            <version>1.0.0</version> | 
				
			|||
        </dependency> | 
				
			|||
 | 
				
			|||
        <!-- nacos start --> | 
				
			|||
        <dependency> | 
				
			|||
            <groupId>com.alibaba.cloud</groupId> | 
				
			|||
            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> | 
				
			|||
        </dependency> | 
				
			|||
        <!-- nacos end --> | 
				
			|||
        <!-- zipkin client --> | 
				
			|||
        <dependency> | 
				
			|||
            <groupId>org.springframework.cloud</groupId> | 
				
			|||
            <artifactId>spring-cloud-starter-zipkin</artifactId> | 
				
			|||
        </dependency> | 
				
			|||
        <dependency> | 
				
			|||
            <groupId>net.rakugakibox.spring.boot</groupId> | 
				
			|||
            <artifactId>orika-spring-boot-starter</artifactId> | 
				
			|||
            <version>1.8.0</version> | 
				
			|||
        </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> | 
				
			|||
            <plugin> | 
				
			|||
                <groupId>org.apache.maven.plugins</groupId> | 
				
			|||
                <artifactId>maven-deploy-plugin</artifactId> | 
				
			|||
                <configuration> | 
				
			|||
                    <skip>true</skip> | 
				
			|||
                </configuration> | 
				
			|||
            </plugin> | 
				
			|||
            <plugin> | 
				
			|||
                <groupId>com.spotify</groupId> | 
				
			|||
                <artifactId>dockerfile-maven-plugin</artifactId> | 
				
			|||
            </plugin> | 
				
			|||
        </plugins> | 
				
			|||
    </build> | 
				
			|||
 | 
				
			|||
</project> | 
				
			|||
@ -0,0 +1,75 @@ | 
				
			|||
server: | 
				
			|||
  port: @server.port@ | 
				
			|||
  servlet: | 
				
			|||
    context-path: /points | 
				
			|||
 | 
				
			|||
spring: | 
				
			|||
  application: | 
				
			|||
    name: epdc-points-server | 
				
			|||
  # 环境 dev|test|prod | 
				
			|||
  profiles: | 
				
			|||
    active: @spring.profiles.active@ | 
				
			|||
  messages: | 
				
			|||
    encoding: UTF-8 | 
				
			|||
    basename: i18n/messages,i18n/messages_common | 
				
			|||
  jackson: | 
				
			|||
    time-zone: GMT+8 | 
				
			|||
    date-format: yyyy-MM-dd HH:mm:ss | 
				
			|||
  redis: | 
				
			|||
    database:  @spring.redis.index@ | 
				
			|||
    host: @spring.redis.host@ | 
				
			|||
    timeout: 30s | 
				
			|||
    port: @spring.redis.port@ | 
				
			|||
    password: @spring.redis.password@ | 
				
			|||
  datasource: | 
				
			|||
    type: com.alibaba.druid.pool.DruidDataSource | 
				
			|||
    druid: | 
				
			|||
      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@ | 
				
			|||
        register-enabled: @nacos.register-enabled@ | 
				
			|||
    alibaba: | 
				
			|||
      seata: | 
				
			|||
        tx-service-group: epdc-demo-server-fescar-service-group | 
				
			|||
  zipkin: | 
				
			|||
    # 指定了 zipkin 服务器的地址 | 
				
			|||
    base-url: http://localhost:9411 | 
				
			|||
    sleuth: | 
				
			|||
      sampler: | 
				
			|||
        # 将采样比例设置为 1.0,也就是全部都需要。默认是 0.1 | 
				
			|||
        probability: 1.0 | 
				
			|||
 | 
				
			|||
management: | 
				
			|||
  endpoints: | 
				
			|||
    web: | 
				
			|||
      exposure: | 
				
			|||
        include: "*" | 
				
			|||
  endpoint: | 
				
			|||
    health: | 
				
			|||
      show-details: ALWAYS | 
				
			|||
 | 
				
			|||
mybatis-plus: | 
				
			|||
  mapper-locations: classpath:/mapper/**/*.xml | 
				
			|||
  #实体扫描,多个package用逗号或者分号分隔 | 
				
			|||
  typeAliasesPackage: io.renren.entity;com.elink.esua.epdc.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' | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
#Default | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
#English | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
#\u7B80\u4F53\u4E2D\u6587 | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
#\u7E41\u4F53\u4E2D\u6587 | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
#Default | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
#English | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
#\u7B80\u4F53\u4E2D\u6587 | 
				
			|||
@ -0,0 +1 @@ | 
				
			|||
#\u7E41\u4F53\u4E2D\u6587 | 
				
			|||
@ -0,0 +1,21 @@ | 
				
			|||
<?xml version="1.0" encoding="UTF-8"?> | 
				
			|||
<configuration> | 
				
			|||
    <include resource="org/springframework/boot/logging/logback/base.xml" /> | 
				
			|||
    <logger name="org.springframework.web" level="INFO"/> | 
				
			|||
    <logger name="org.springboot.sample" level="TRACE" /> | 
				
			|||
 | 
				
			|||
    <!-- 开发、测试环境 --> | 
				
			|||
    <springProfile name="dev,test"> | 
				
			|||
        <logger name="org.springframework.web" level="INFO"/> | 
				
			|||
        <logger name="org.springboot.sample" level="INFO" /> | 
				
			|||
        <logger name="io.renren" level="DEBUG" /> | 
				
			|||
    </springProfile> | 
				
			|||
 | 
				
			|||
    <!-- 生产环境 --> | 
				
			|||
    <springProfile name="prod"> | 
				
			|||
        <logger name="org.springframework.web" level="ERROR"/> | 
				
			|||
        <logger name="org.springboot.sample" level="ERROR" /> | 
				
			|||
        <logger name="io.renren" level="ERROR" /> | 
				
			|||
    </springProfile> | 
				
			|||
 | 
				
			|||
</configuration> | 
				
			|||
@ -0,0 +1,21 @@ | 
				
			|||
registry { | 
				
			|||
  # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa | 
				
			|||
  type = "nacos" | 
				
			|||
 | 
				
			|||
  nacos { | 
				
			|||
    serverAddr = "47.104.224.45" | 
				
			|||
    namespace = "public" | 
				
			|||
    cluster = "default" | 
				
			|||
  } | 
				
			|||
} | 
				
			|||
 | 
				
			|||
config { | 
				
			|||
  # file、nacos 、apollo、zk、consul、etcd3 | 
				
			|||
  type = "nacos" | 
				
			|||
 | 
				
			|||
  nacos { | 
				
			|||
    serverAddr = "47.104.224.45" | 
				
			|||
    namespace = "public" | 
				
			|||
    cluster = "default" | 
				
			|||
  } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,19 @@ | 
				
			|||
<?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> | 
				
			|||
		<groupId>com.esua.epdc</groupId> | 
				
			|||
		<artifactId>epdc-module</artifactId> | 
				
			|||
		<version>1.0.0</version> | 
				
			|||
	</parent> | 
				
			|||
 | 
				
			|||
	<artifactId>epdc-points</artifactId> | 
				
			|||
	<packaging>pom</packaging> | 
				
			|||
	<modules> | 
				
			|||
		<module>epdc-points-client</module> | 
				
			|||
		<module>epdc-points-server</module> | 
				
			|||
	</modules> | 
				
			|||
 | 
				
			|||
</project> | 
				
			|||
					Loading…
					
					
				
		Reference in new issue