diff --git a/energy-service-api/energy-biz-appraise-api/src/main/java/org/springenergy/bizAppraise/vo/BizAppraisePlanVO.java b/energy-service-api/energy-biz-appraise-api/src/main/java/org/springenergy/bizAppraise/vo/BizAppraisePlanVO.java index 970fa79..84d458b 100644 --- a/energy-service-api/energy-biz-appraise-api/src/main/java/org/springenergy/bizAppraise/vo/BizAppraisePlanVO.java +++ b/energy-service-api/energy-biz-appraise-api/src/main/java/org/springenergy/bizAppraise/vo/BizAppraisePlanVO.java @@ -17,7 +17,6 @@ package org.springenergy.bizAppraise.vo; import org.springenergy.bizAppraise.entity.BizAppraisePlanEntity; -import org.springenergy.core.tool.node.INode; import lombok.Data; import lombok.EqualsAndHashCode; @@ -30,6 +29,6 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) public class BizAppraisePlanVO extends BizAppraisePlanEntity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; } diff --git a/energy-service/energy-biz-anomaly/pom.xml b/energy-service/energy-biz-anomaly/pom.xml index 6255461..7b518e3 100644 --- a/energy-service/energy-biz-anomaly/pom.xml +++ b/energy-service/energy-biz-anomaly/pom.xml @@ -14,6 +14,24 @@ jar + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + 2021.0.5.0 + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + 2021.0.5.0 + + + org.springenergy + energy-framework-compat + org.springframework.boot spring-boot-starter @@ -24,17 +42,14 @@ com.github.xiaoymin - knife4j-spring-boot-starter + knife4j-annotations + ${knife4j.version} org.springenergy energy-biz-anomaly-api 1.0.0 - - org.springenergy - energy-user-api - org.springframework.boot spring-boot-configuration-processor diff --git a/energy-service/energy-biz-anomaly/src/main/java/org/springenergy/bizAnomalyInfo/BizAnomalyApplication.java b/energy-service/energy-biz-anomaly/src/main/java/org/springenergy/bizAnomalyInfo/BizAnomalyApplication.java index a3b53cc..d362cea 100644 --- a/energy-service/energy-biz-anomaly/src/main/java/org/springenergy/bizAnomalyInfo/BizAnomalyApplication.java +++ b/energy-service/energy-biz-anomaly/src/main/java/org/springenergy/bizAnomalyInfo/BizAnomalyApplication.java @@ -16,8 +16,11 @@ */ package org.springenergy.bizAnomalyInfo; -import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; /** * Desk启动器 @@ -25,11 +28,14 @@ import org.springframework.boot.SpringApplication; * @author Chill */ @SpringBootApplication +@EnableDiscoveryClient +@EnableFeignClients(basePackages = "org.springenergy") +@MapperScan("org.springenergy.bizAnomalyInfo.mapper") public class BizAnomalyApplication { - public static void main(String[] args) { - SpringApplication.run(BizAnomalyApplication.class, args); - } + public static void main(String[] args) { + SpringApplication.run(BizAnomalyApplication.class, args); + } } diff --git a/energy-service/energy-biz-anomaly/src/main/resources/application-dev.yml b/energy-service/energy-biz-anomaly/src/main/resources/application-dev.yml index ba2a65a..60a3806 100644 --- a/energy-service/energy-biz-anomaly/src/main/resources/application-dev.yml +++ b/energy-service/energy-biz-anomaly/src/main/resources/application-dev.yml @@ -4,8 +4,20 @@ server: #数据源配置 spring: + application: + name: energy-biz-anomaly + mvc: + pathmatch: + matching-strategy: ant_path_matcher datasource: - url: ${energy.datasource.dev.url} - username: ${energy.datasource.dev.username} - password: ${energy.datasource.dev.password} + dynamic: + enabled: false + driver-class-name: oracle.jdbc.OracleDriver + url: ${ENERGY_DATASOURCE_DEV_URL:${energy.datasource.dev.url:jdbc:oracle:thin:@//192.168.1.102:1521/ORCLPDB}} + username: ${ENERGY_DATASOURCE_DEV_USERNAME:${energy.datasource.dev.username:ENERGYX}} + password: ${ENERGY_DATASOURCE_DEV_PASSWORD:${energy.datasource.dev.password:}} + +springfox: + documentation: + enabled: false diff --git a/energy-service/energy-biz-anomaly/src/main/resources/bootstrap.yml b/energy-service/energy-biz-anomaly/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..7e9eb5e --- /dev/null +++ b/energy-service/energy-biz-anomaly/src/main/resources/bootstrap.yml @@ -0,0 +1,21 @@ +spring: + application: + name: energy-biz-anomaly + profiles: + active: ${SPRING_PROFILES_ACTIVE:dev} + cloud: + nacos: + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:nacos} + discovery: + server-addr: ${NACOS_ADDR:localhost:8848} + config: + server-addr: ${NACOS_ADDR:localhost:8848} + file-extension: yaml + shared-configs: + - data-id: energy.yaml + group: DEFAULT_GROUP + refresh: true + - data-id: energy-${spring.profiles.active}.yaml + group: DEFAULT_GROUP + refresh: true diff --git a/energy-service/energy-biz-appraise/pom.xml b/energy-service/energy-biz-appraise/pom.xml index 0ac197c..b562735 100644 --- a/energy-service/energy-biz-appraise/pom.xml +++ b/energy-service/energy-biz-appraise/pom.xml @@ -14,6 +14,24 @@ jar + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + 2021.0.5.0 + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + 2021.0.5.0 + + + org.springenergy + energy-framework-compat + org.springframework.boot spring-boot-starter @@ -24,17 +42,14 @@ com.github.xiaoymin - knife4j-spring-boot-starter + knife4j-annotations + ${knife4j.version} org.springenergy energy-biz-appraise-api 1.0.0 - - org.springenergy - energy-user-api - org.springframework.boot spring-boot-configuration-processor diff --git a/energy-service/energy-biz-appraise/src/main/java/org/springenergy/bizAppraise/BizAppraiseApplication.java b/energy-service/energy-biz-appraise/src/main/java/org/springenergy/bizAppraise/BizAppraiseApplication.java index 63575cd..90d2437 100644 --- a/energy-service/energy-biz-appraise/src/main/java/org/springenergy/bizAppraise/BizAppraiseApplication.java +++ b/energy-service/energy-biz-appraise/src/main/java/org/springenergy/bizAppraise/BizAppraiseApplication.java @@ -16,8 +16,11 @@ */ package org.springenergy.bizAppraise; -import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; /** * Desk启动器 @@ -25,11 +28,14 @@ import org.springframework.boot.SpringApplication; * @author Chill */ @SpringBootApplication +@EnableDiscoveryClient +@EnableFeignClients(basePackages = "org.springenergy") +@MapperScan("org.springenergy.bizAppraise.mapper") public class BizAppraiseApplication { - public static void main(String[] args) { - SpringApplication.run(BizAppraiseApplication.class, args); - } + public static void main(String[] args) { + SpringApplication.run(BizAppraiseApplication.class, args); + } } diff --git a/energy-service/energy-biz-appraise/src/main/resources/application-dev.yml b/energy-service/energy-biz-appraise/src/main/resources/application-dev.yml index 5284cd3..7a3967e 100644 --- a/energy-service/energy-biz-appraise/src/main/resources/application-dev.yml +++ b/energy-service/energy-biz-appraise/src/main/resources/application-dev.yml @@ -4,8 +4,20 @@ server: #数据源配置 spring: + application: + name: energy-biz-appraise + mvc: + pathmatch: + matching-strategy: ant_path_matcher datasource: - url: ${energy.datasource.dev.url} - username: ${energy.datasource.dev.username} - password: ${energy.datasource.dev.password} + dynamic: + enabled: false + driver-class-name: oracle.jdbc.OracleDriver + url: ${ENERGY_DATASOURCE_DEV_URL:${energy.datasource.dev.url:jdbc:oracle:thin:@//192.168.1.102:1521/ORCLPDB}} + username: ${ENERGY_DATASOURCE_DEV_USERNAME:${energy.datasource.dev.username:ENERGYX}} + password: ${ENERGY_DATASOURCE_DEV_PASSWORD:${energy.datasource.dev.password:}} + +springfox: + documentation: + enabled: false diff --git a/energy-service/energy-biz-appraise/src/main/resources/bootstrap.yml b/energy-service/energy-biz-appraise/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..9b6cf2f --- /dev/null +++ b/energy-service/energy-biz-appraise/src/main/resources/bootstrap.yml @@ -0,0 +1,21 @@ +spring: + application: + name: energy-biz-appraise + profiles: + active: ${SPRING_PROFILES_ACTIVE:dev} + cloud: + nacos: + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:nacos} + discovery: + server-addr: ${NACOS_ADDR:localhost:8848} + config: + server-addr: ${NACOS_ADDR:localhost:8848} + file-extension: yaml + shared-configs: + - data-id: energy.yaml + group: DEFAULT_GROUP + refresh: true + - data-id: energy-${spring.profiles.active}.yaml + group: DEFAULT_GROUP + refresh: true