MainApplication.kt 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. package cn.gygxzc.envir
  2. import cn.gygxzc.cloud.tina.auth.EnableTinaAuth
  3. import cn.gygxzc.cloud.tina.fastdfs.client.EnableFastDFSClient
  4. import cn.gygxzc.tina.cloud.bus.EnableRabbitMessage
  5. import cn.gygxzc.tina.cloud.jwt.session.EnableJwtRedisSession
  6. import org.mybatis.spring.annotation.MapperScan
  7. import org.springframework.boot.SpringApplication
  8. import org.springframework.boot.autoconfigure.SpringBootApplication
  9. import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
  10. import org.springframework.boot.builder.SpringApplicationBuilder
  11. import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
  12. import org.springframework.cloud.client.discovery.EnableDiscoveryClient
  13. import org.springframework.cloud.openfeign.EnableFeignClients
  14. /**
  15. * 注解配置
  16. */
  17. @EnableTinaAuth
  18. @EnableFeignClients
  19. @EnableFastDFSClient
  20. @EnableRabbitMessage
  21. @EnableDiscoveryClient
  22. @EnableJwtRedisSession
  23. @SpringBootApplication(scanBasePackages = ["cn.gygxzc.envir", "com.gxzc"], exclude = [RedisAutoConfiguration::class])
  24. @MapperScan(basePackages = ["cn.gygxzc.**.dao", "cn.gygxzc.**.mapper"])
  25. open class MainApplication : SpringBootServletInitializer() {
  26. override fun configure(builder: SpringApplicationBuilder?): SpringApplicationBuilder? {
  27. return builder?.sources(MainApplication::class.java)
  28. }
  29. }
  30. fun main(args: Array<String>) {
  31. SpringApplication.run(MainApplication::class.java, *args)
  32. }