Commit 7438cf1e22a4afac19d1c7ae2c07c2484205b5fc
1 parent
dc2c9129
1.chengdu分支配置变更
Showing
2 changed files
with
42 additions
and
27 deletions
src/main/java/com/bsth/Application.java
| 1 | -package com.bsth; | |
| 2 | - | |
| 3 | -import org.springframework.boot.SpringApplication; | |
| 4 | -import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| 5 | -import org.springframework.boot.builder.SpringApplicationBuilder; | |
| 6 | -import org.springframework.boot.web.support.SpringBootServletInitializer; | |
| 7 | - | |
| 8 | -import java.util.concurrent.Executors; | |
| 9 | -import java.util.concurrent.ScheduledExecutorService; | |
| 10 | - | |
| 11 | -@SpringBootApplication | |
| 12 | -public class Application extends SpringBootServletInitializer { | |
| 13 | - | |
| 14 | - public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(10); | |
| 15 | - | |
| 16 | - @Override | |
| 17 | - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
| 18 | - return application.sources(Application.class); | |
| 19 | - } | |
| 20 | - | |
| 21 | - public static void main(String[] args) throws Exception { | |
| 22 | - SpringApplication.run(Application.class, args); | |
| 23 | - } | |
| 24 | - | |
| 1 | +package com.bsth; | |
| 2 | + | |
| 3 | +import org.springframework.boot.SpringApplication; | |
| 4 | +import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| 5 | +import org.springframework.boot.builder.SpringApplicationBuilder; | |
| 6 | +import org.springframework.boot.web.support.SpringBootServletInitializer; | |
| 7 | + | |
| 8 | +import java.lang.management.ManagementFactory; | |
| 9 | +import java.lang.management.RuntimeMXBean; | |
| 10 | +import java.util.List; | |
| 11 | +import java.util.concurrent.Executors; | |
| 12 | +import java.util.concurrent.ScheduledExecutorService; | |
| 13 | + | |
| 14 | +@SpringBootApplication | |
| 15 | +public class Application extends SpringBootServletInitializer { | |
| 16 | + | |
| 17 | + public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(10); | |
| 18 | + | |
| 19 | + @Override | |
| 20 | + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | |
| 21 | + return application.sources(Application.class); | |
| 22 | + } | |
| 23 | + | |
| 24 | + public static void main(String[] args) throws Exception { | |
| 25 | + RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean(); | |
| 26 | + List<String> arguments = runtimeMxBean.getInputArguments(); | |
| 27 | + boolean normal = false; | |
| 28 | + for (String arg : arguments) { | |
| 29 | + if (arg.indexOf("-XX:+DisableAttachMechanism") > -1) { | |
| 30 | + normal = true; | |
| 31 | + break; | |
| 32 | + } | |
| 33 | + } | |
| 34 | + | |
| 35 | + if (normal) { | |
| 36 | + SpringApplication.run(Application.class, args); | |
| 37 | + } | |
| 38 | + } | |
| 39 | + | |
| 25 | 40 | } |
| 26 | 41 | \ No newline at end of file | ... | ... |
src/main/resources/application-prod.properties
| ... | ... | @@ -25,11 +25,11 @@ spring.datasource.validation-query=select 1 |
| 25 | 25 | |
| 26 | 26 | #REDIS |
| 27 | 27 | spring.redis.database=0 |
| 28 | -spring.redis.host=10.10.150.103 | |
| 28 | +spring.redis.host=10.10.2.20 | |
| 29 | 29 | spring.redis.password=bsth_control_001 |
| 30 | 30 | spring.redis.port=28008 |
| 31 | 31 | |
| 32 | -http.control.service_data_url= http://10.10.150.103:9088/companyService | |
| 32 | +http.control.service_data_url= http://10.10.2.20:9088/companyService | |
| 33 | 33 | http.control.secret.key= dVPHJkWUt5FhMT7jrM2dLV7QvlHAmZFd42rs1P0usBx8A7HZki |
| 34 | 34 | |
| 35 | -http.gps.real.url= http://10.10.150.103:8080/transport_server/rtgps/ | |
| 36 | 35 | \ No newline at end of file |
| 36 | +http.gps.real.url= http://10.10.2.20:8080/transport_server/rtgps/ | |
| 37 | 37 | \ No newline at end of file | ... | ... |