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.
 
 
 
 
 

60 lines
1.4 KiB

  1. package com.iformall;
  2. import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
  3. import org.rocketmq.starter.annotation.EnableRocketMQ;
  4. import org.springframework.beans.factory.annotation.Value;
  5. import org.springframework.boot.SpringApplication;
  6. import org.springframework.boot.autoconfigure.SpringBootApplication;
  7. import org.springframework.context.annotation.Bean;
  8. import springfox.documentation.swagger2.annotations.EnableSwagger2;
  9. import tk.mybatis.spring.annotation.MapperScan;
  10. /**
  11. * @author chenkx
  12. * @date 2017-12-26
  13. */
  14. @SpringBootApplication
  15. @MapperScan(basePackages = {"com.iformall.mapper"})
  16. @EnableSwagger2
  17. @EnableRocketMQ
  18. @EnableEncryptableProperties
  19. public class ConsumerApplication {
  20. @Value("${fm.exception}")
  21. private boolean fmException;
  22. @Value("${fm.exception_emails}")
  23. private String fmExceptionEmails;
  24. @Value("${fm.open}")
  25. private boolean fmOpen;
  26. @Value("${fm.upload_dir}")
  27. private String uploadDir;
  28. @Bean
  29. public boolean isFmException() {
  30. return fmException;
  31. }
  32. @Bean
  33. public String fmExceptionEmails() {
  34. return fmExceptionEmails;
  35. }
  36. @Bean
  37. public boolean isFmOpen() {
  38. return fmOpen;
  39. }
  40. @Bean
  41. public String fmUploadDir() {
  42. return uploadDir;
  43. }
  44. public static void main(String[] args) {
  45. SpringApplication.run(ConsumerApplication.class, args);
  46. }
  47. }