MainApplication.kt 996 B

1234567891011121314151617181920212223242526272829
  1. package cn.gygxzc.envir
  2. import org.mybatis.spring.annotation.MapperScan
  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.servlet.support.SpringBootServletInitializer
  7. import org.springframework.cloud.client.discovery.EnableDiscoveryClient
  8. import org.springframework.cloud.openfeign.EnableFeignClients
  9. /**
  10. * 注解配置
  11. */
  12. @EnableDiscoveryClient
  13. @EnableFeignClients
  14. @SpringBootApplication(scanBasePackages = ["com.gxzc", "cn.gygxzc"])
  15. @MapperScan(basePackages = ["cn.gygxzc.**.dao","cn.gygxzc.**.mapper"])
  16. class MainApplication : SpringBootServletInitializer() {
  17. override fun configure(builder: SpringApplicationBuilder?): SpringApplicationBuilder? {
  18. return builder?.sources(MainApplication::class.java)
  19. }
  20. }
  21. fun main(args: Array<String>) {
  22. SpringApplication.run(MainApplication::class.java, *args)
  23. }