chore: rename application main classes to Dc3-prefixed convention

This commit is contained in:
pnoker
2018-08-31 09:18:55 +08:00
parent 93fc649a96
commit bcda35ada2
13 changed files with 40 additions and 38 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
target/
!.mvn/wrapper/maven-wrapper.jar
logs/
dc3-logs/
### STS ###
.apt_generated
@@ -10,9 +10,9 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
*/
@EnableEurekaClient
@SpringBootApplication
public class DbServiceApplication {
public class Dc3DbsApplication {
public static void main(String[] args) {
SpringApplication.run(DbServiceApplication.class, args);
SpringApplication.run(Dc3DbsApplication.class, args);
}
}
@@ -1,6 +1,8 @@
package com.pnoker.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@@ -14,8 +16,11 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
public class IndexController {
@Autowired
private Environment environment;
@RequestMapping(value = "/hello", method = RequestMethod.GET)
public String helloController() {
return "hello world";
return String.format("hello world with %s", environment.getProperty("server.port"));
}
}
+1 -1
View File
@@ -20,7 +20,7 @@ spring:
# 日志配置
logging:
file: logs/dc3-dbs.log
file: dc3-logs/dc3-dbs.log
#配置Actuator监控路径 * 表示全部监控
management:
+6 -7
View File
@@ -1,7 +1,6 @@
_ _____ _ _
| | |____ | | | |
__| | ___ / /______ __| | |__ ___
/ _` |/ __| \ \______/ _` | '_ \/ __|
| (_| | (__.___/ / | (_| | |_) \__ \
\__,_|\___\____/ \__,_|_.__/|___/
.___ ________ .___ ___________ .__ __ _____
__| _/____ \_____ \ ____ ______ ____ ____ __________ __ _________ ____ ____ | | ___\__ ___/ ______ | | _____ _/ |__/ ____\___________ _____
/ __ |/ ___\ _(__ < / _ \\____ \_/ __ \ / \ ______ / ___/ _ \| | \_ __ \_/ ___\/ __ \ | |/ _ \| | \____ \| | \__ \\ __\ __\/ _ \_ __ \/ \
/ /_/ \ \___ / \ ( <_> ) |_> > ___/| | \ /_____/ \___ ( <_> ) | /| | \/\ \__\ ___/ | ( <_> ) | | |_> > |__/ __ \| | | | ( <_> ) | \/ Y Y \
\____ |\___ >______ / \____/| __/ \___ >___| / /____ >____/|____/ |__| \___ >___ > |___|\____/|____| | __/|____(____ /__| |__| \____/|__| |__|_| /
\/ \/ \/ |__| \/ \/ \/ \/ \/ |__| \/ \/
@@ -10,9 +10,9 @@ import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
*/
@EnableEurekaServer
@SpringBootApplication
public class ServiceCenterApplication {
public class Dc3ServiceCenterApplication {
public static void main(String[] args) {
SpringApplication.run(ServiceCenterApplication.class, args);
SpringApplication.run(Dc3ServiceCenterApplication.class, args);
}
}
@@ -7,11 +7,11 @@ server:
spring:
application:
name: dc3-service
name: dc3-service-center
# 日志配置
logging:
file: logs/dc3-service.log
file: dc3-logs/dc3-service-center.log
#配置Actuator监控路径 * 表示全部监控
management:
@@ -1,7 +1,6 @@
_ _____ _
| | |____ | (_)
__| | ___ / /______ ___ ___ _ ____ ___ ___ ___
/ _` |/ __| \ \______/ __|/ _ \ '__\ \ / / |/ __/ _ \
| (_| | (__.___/ / \__ \ __/ | \ V /| | (_| __/
\__,_|\___\____/ |___/\___|_| \_/ |_|\___\___|
.___ ________ .___ ___________ .__ __ _____
__| _/____ \_____ \ ____ ______ ____ ____ __________ __ _________ ____ ____ | | ___\__ ___/ ______ | | _____ _/ |__/ ____\___________ _____
/ __ |/ ___\ _(__ < / _ \\____ \_/ __ \ / \ ______ / ___/ _ \| | \_ __ \_/ ___\/ __ \ | |/ _ \| | \____ \| | \__ \\ __\ __\/ _ \_ __ \/ \
/ /_/ \ \___ / \ ( <_> ) |_> > ___/| | \ /_____/ \___ ( <_> ) | /| | \/\ \__\ ___/ | ( <_> ) | | |_> > |__/ __ \| | | | ( <_> ) | \/ Y Y \
\____ |\___ >______ / \____/| __/ \___ >___| / /____ >____/|____/ |__| \___ >___ > |___|\____/|____| | __/|____(____ /__| |__| \____/|__| |__|_| /
\/ \/ \/ |__| \/ \/ \/ \/ \/ |__| \/ \/
@@ -15,9 +15,9 @@ import org.springframework.web.client.RestTemplate;
@EnableAsync
@EnableDiscoveryClient
@SpringBootApplication
public class WebappApplication {
public class Dc3WebappApplication {
public static void main(String[] args) {
SpringApplication.run(WebappApplication.class, args);
SpringApplication.run(Dc3WebappApplication.class, args);
}
@Bean
@@ -19,8 +19,8 @@ public class IndexController {
@Autowired
RestTemplate restTemplate;
@RequestMapping(value = "/ribbon-consumer", method = RequestMethod.GET)
public String helloController() {
return restTemplate.getForEntity("http://DC3-CLI-MODBUS/hello", String.class).getBody();
@RequestMapping(value = "/hello", method = RequestMethod.GET)
public String hello() {
return restTemplate.getForEntity("http://DC3-DBS/hello", String.class).getBody();
}
}
@@ -7,11 +7,11 @@ server:
spring:
application:
name: dc3-web
name: dc3-webapp
# 日志配置
logging:
file: logs/dc3-web.log
file: dc3-logs/dc3-webapp.log
#配置Actuator监控路径 * 表示全部监控
management:
+6 -7
View File
@@ -1,7 +1,6 @@
_ _____ _
| | |____ | | |
__| | ___ / /________ _____| |__
/ _` |/ __| \ \______\ \ /\ / / _ \ '_ \
| (_| | (__.___/ / \ V V / __/ |_) |
\__,_|\___\____/ \_/\_/ \___|_.__/
.___ ________ .___ ___________ .__ __ _____
__| _/____ \_____ \ ____ ______ ____ ____ __________ __ _________ ____ ____ | | ___\__ ___/ ______ | | _____ _/ |__/ ____\___________ _____
/ __ |/ ___\ _(__ < / _ \\____ \_/ __ \ / \ ______ / ___/ _ \| | \_ __ \_/ ___\/ __ \ | |/ _ \| | \____ \| | \__ \\ __\ __\/ _ \_ __ \/ \
/ /_/ \ \___ / \ ( <_> ) |_> > ___/| | \ /_____/ \___ ( <_> ) | /| | \/\ \__\ ___/ | ( <_> ) | | |_> > |__/ __ \| | | | ( <_> ) | \/ Y Y \
\____ |\___ >______ / \____/| __/ \___ >___| / /____ >____/|____/ |__| \___ >___ > |___|\____/|____| | __/|____(____ /__| |__| \____/|__| |__|_| /
\/ \/ \/ |__| \/ \/ \/ \/ \/ |__| \/ \/
+1 -1
View File
@@ -8,7 +8,7 @@
<version>3.0</version>
<packaging>pom</packaging>
<description>数据采集系统 V3.0 , 基于Spring Cloud框架搭建</description>
<description>开源分布式物联网(IOT)平台 , 基于Spring Cloud框架搭建</description>
<!-- parent -->
<parent>