MainApplication.kt 1.0 KB

123456789101112131415161718192021222324252627282930
  1. package cn.gygxzc.envir
  2. import cn.gygxzc.tina.cloud.jwt.session.filter.JwtSessionRepositoryFilter
  3. import org.mybatis.spring.annotation.MapperScan
  4. import org.springframework.boot.SpringApplication
  5. import org.springframework.boot.autoconfigure.SpringBootApplication
  6. import org.springframework.boot.builder.SpringApplicationBuilder
  7. import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
  8. import org.springframework.cloud.client.discovery.EnableDiscoveryClient
  9. import org.springframework.cloud.openfeign.EnableFeignClients
  10. /**
  11. * 注解配置
  12. */
  13. @EnableDiscoveryClient
  14. @EnableFeignClients
  15. @SpringBootApplication(scanBasePackages = ["com.gxzc", "cn.gygxzc"])
  16. @MapperScan(basePackages = ["com.gxzc", "cn.gygxzc"])
  17. class MainApplication : SpringBootServletInitializer() {
  18. override fun configure(builder: SpringApplicationBuilder?): SpringApplicationBuilder? {
  19. return builder?.sources(MainApplication::class.java)
  20. }
  21. }
  22. fun main(args: Array<String>) {
  23. SpringApplication.run(MainApplication::class.java, *args)
  24. }