|
@@ -5,16 +5,17 @@ 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.discovery.EnableDiscoveryClient
|
|
|
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer
|
|
|
|
|
|
/**
|
|
|
* 注解配置
|
|
|
*/
|
|
|
|
|
|
-@EnableEurekaServer //表示该服务为注册中心
|
|
|
-//@EnableDiscoveryClient
|
|
|
-@SpringBootApplication(scanBasePackages = ["com.gxzc","cn.gygxzc"])
|
|
|
-@MapperScan(basePackages = ["com.gxzc","cn.gygxzc"])
|
|
|
+//@EnableEurekaServer //表示该服务为注册中心
|
|
|
+@EnableDiscoveryClient
|
|
|
+@SpringBootApplication(scanBasePackages = ["com.gxzc", "cn.gygxzc"])
|
|
|
+@MapperScan(basePackages = ["com.gxzc", "cn.gygxzc"])
|
|
|
class MainApplication : SpringBootServletInitializer() {
|
|
|
override fun configure(builder: SpringApplicationBuilder?): SpringApplicationBuilder? {
|
|
|
return builder?.sources(MainApplication::class.java)
|