|
@@ -33,8 +33,9 @@ import org.springframework.boot.SpringApplication
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication
|
|
|
import org.springframework.boot.builder.SpringApplicationBuilder
|
|
|
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
|
|
|
-import org.springframework.cloud.client.loadbalancer.LoadBalanced
|
|
|
-import org.springframework.cloud.netflix.eureka.EnableEurekaClient
|
|
|
+//import org.springframework.cloud.client.loadbalancer.LoadBalanced
|
|
|
+//import org.springframework.cloud.client.loadbalancer.LoadBalanced
|
|
|
+//import org.springframework.cloud.netflix.eureka.EnableEurekaClient
|
|
|
import org.springframework.context.annotation.Bean
|
|
|
import org.springframework.context.annotation.ComponentScan
|
|
|
import org.springframework.scheduling.annotation.EnableAsync
|
|
@@ -51,7 +52,7 @@ import org.springframework.web.client.RestTemplate
|
|
|
@EnableScheduling //开启定时注解
|
|
|
@ComponentScan(basePackages = ["com.persagy", "com.persagy.server"]) // 配置组件扫描路径
|
|
|
@MapperScan("com.persagy", "com.persagy.server") // Mapper组件扫描路径
|
|
|
-@EnableEurekaClient
|
|
|
+//@EnableEurekaClient
|
|
|
@SpringBootApplication
|
|
|
open class DataSynApp : SpringBootServletInitializer() {
|
|
|
companion object {
|
|
@@ -60,11 +61,11 @@ open class DataSynApp : SpringBootServletInitializer() {
|
|
|
} // Companion object
|
|
|
|
|
|
|
|
|
- @Bean
|
|
|
- @LoadBalanced //在注册中心里进行查找微服务,负载均衡
|
|
|
- open fun restTemplate(): RestTemplate? {
|
|
|
- return RestTemplate()
|
|
|
- }
|
|
|
+// @Bean
|
|
|
+// @LoadBalanced //在注册中心里进行查找微服务,负载均衡
|
|
|
+// open fun restTemplate(): RestTemplate? {
|
|
|
+// return RestTemplate()
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 配置应用
|