后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.1 KiB

  1. package com.iformall;
  2. import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
  3. import org.mybatis.spring.annotation.MapperScan;
  4. import org.rocketmq.starter.annotation.EnableRocketMQ;
  5. import org.springframework.beans.factory.annotation.Value;
  6. import org.springframework.boot.SpringApplication;
  7. import org.springframework.boot.autoconfigure.SpringBootApplication;
  8. import org.springframework.context.annotation.Bean;
  9. import org.springframework.context.annotation.EnableAspectJAutoProxy;
  10. import org.springframework.scheduling.annotation.EnableAsync;
  11. import org.springframework.scheduling.annotation.EnableScheduling;
  12. import springfox.documentation.swagger2.annotations.EnableSwagger2;
  13. /**
  14. * @author chenkx
  15. * @date 2017-12-26
  16. */
  17. @SpringBootApplication
  18. @MapperScan(basePackages = {"com.iformall.mapper"})
  19. @EnableSwagger2
  20. @EnableRocketMQ
  21. @EnableEncryptableProperties
  22. @EnableAspectJAutoProxy(exposeProxy = true)
  23. @EnableScheduling
  24. @EnableAsync
  25. public class ScheduleApplication {
  26. @Value("${fm.exception}")
  27. private boolean fmException;
  28. @Value("${fm.exception_emails}")
  29. private String fmExceptionEmails;
  30. @Value("${fm.open}")
  31. private boolean fmOpen;
  32. @Value("${fm.upload_dir}")
  33. private String uploadDir;
  34. @Value("${fm.monitor_emails}")
  35. private String fmMonitorEmails;
  36. @Value("${fm.monitor_enable}")
  37. private boolean fmMonitor;
  38. @Value("${fm.videoType}")
  39. private String videoType;
  40. @Bean
  41. public boolean isFmException() {
  42. return fmException;
  43. }
  44. @Bean
  45. public String fmExceptionEmails() {
  46. return fmExceptionEmails;
  47. }
  48. @Bean
  49. public boolean isFmOpen() {
  50. return fmOpen;
  51. }
  52. @Bean
  53. public String fmUploadDir() {
  54. return uploadDir;
  55. }
  56. @Bean
  57. public String fmMonitorEmails() {
  58. return fmMonitorEmails;
  59. }
  60. @Bean
  61. public boolean isFmMonitor() {
  62. return fmMonitor;
  63. }
  64. @Bean
  65. public String videoType() {
  66. return videoType;
  67. }
  68. public static void main(String[] args) {
  69. SpringApplication.run(ScheduleApplication.class, args);
  70. }
  71. }