diff --git a/epmet-module/gov-access/gov-access-client/pom.xml b/epmet-module/gov-access/gov-access-client/pom.xml new file mode 100644 index 0000000000..ad7c7ab019 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/pom.xml @@ -0,0 +1,16 @@ + + + 0.3.0 + + gov-access + com.epmet + 0.3.0 + + 4.0.0 + + gov-access-client + + + \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/pom.xml b/epmet-module/gov-access/gov-access-server/pom.xml new file mode 100644 index 0000000000..31695bd331 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/pom.xml @@ -0,0 +1,182 @@ + + + 0.3.0 + + gov-access + com.epmet + 0.3.0 + + 4.0.0 + + gov-access-server + jar + + + + com.epmet + gov-access-client + 0.3.0 + + + com.epmet + epmet-commons-tools + 2.0.0 + + + com.epmet + epmet-commons-mybatis + 2.0.0 + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework + spring-context-support + + + org.springframework.boot + spring-boot-starter-actuator + + + de.codecentric + spring-boot-admin-starter-client + ${spring.boot.admin.version} + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + io.github.openfeign + feign-httpclient + 10.3.0 + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + ${project.basedir}/src/main/java + + + true + ${basedir}/src/main/resources + + + + + + + dev-local + + true + + + 8097 + dev + + + + + + epmet_gov_access_user + EpmEt-db-UsEr + + 0 + 192.168.1.130 + 6379 + 123456 + + false + 122.152.200.70:8848 + fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b + + + false + + + + + dev + + + 8093 + dev + + + + + + epmet + elink@833066 + + 0 + r-m5eoz5b6tkx09y6bpz.redis.rds.aliyuncs.com + 6379 + EpmEtrEdIs!q@w + + true + 192.168.10.150:8848 + 67e3c350-533e-4d7c-9f8f-faf1b4aa82ae + + + false + + + + + test + + + 8093 + test + + + + + + epmet + elink@833066 + + 0 + 10.10.10.248 + 6379 + 123456 + + true + 122.152.200.70:8848 + fcd6fc8f-ca3a-4b01-8026-2b05cdc5976b + + + false + + + + + + \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java new file mode 100644 index 0000000000..f4781aa923 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/GovAccessApplication.java @@ -0,0 +1,20 @@ +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; + +/** + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@SpringBootApplication +@EnableDiscoveryClient +@EnableFeignClients +public class GovAccessApplication { + public static void main(String[] args) { + SpringApplication.run(GovAccessApplication.class, args); + } +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/config/ModuleConfigImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/config/ModuleConfigImpl.java new file mode 100644 index 0000000000..128f1060ef --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/config/ModuleConfigImpl.java @@ -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 "govaccess"; + } +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml new file mode 100644 index 0000000000..cf118b769a --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/bootstrap.yml @@ -0,0 +1,103 @@ +server: + port: @server.port@ + servlet: + context-path: /gov/access + +spring: + main: + allow-bean-definition-overriding: true + application: + name: gov-access-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 + #指定共享配置,且支持动态刷新 +# ext-config: +# - data-id: datasource.yaml +# group: ${spring.cloud.nacos.config.group} +# refresh: true +# - data-id: common.yaml +# group: ${spring.cloud.nacos.config.group} +# refresh: true +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 diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/logback-spring.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000000..86fc4a6979 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/logback-spring.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + debug + + + ${CONSOLE_LOG_PATTERN} + + UTF-8 + + + + + + + + ${log.path}/debug.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/debug-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + debug + ACCEPT + DENY + + + + + + + ${log.path}/info.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/info-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + info + ACCEPT + DENY + + + + + + + ${log.path}/warn.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + warn + ACCEPT + DENY + + + + + + + ${log.path}/error.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/error-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epmet-module/gov-access/pom.xml b/epmet-module/gov-access/pom.xml new file mode 100644 index 0000000000..3c5ac0d7dd --- /dev/null +++ b/epmet-module/gov-access/pom.xml @@ -0,0 +1,21 @@ + + + + epmet-module + com.epmet + 2.0.0 + + 4.0.0 + + gov-access + pom + 0.3.0 + + gov-access-client + gov-access-server + + + + \ No newline at end of file diff --git a/epmet-module/pom.xml b/epmet-module/pom.xml index f48d428c3e..d4fc0c7ae2 100644 --- a/epmet-module/pom.xml +++ b/epmet-module/pom.xml @@ -27,6 +27,7 @@ resi-mine resi-group resi-partymember - + gov-access +