后台服务
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.

86 lines
2.4 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.ConfigurableApplicationContext;
  9. import org.springframework.context.annotation.Bean;
  10. import org.springframework.context.annotation.EnableAspectJAutoProxy;
  11. import springfox.documentation.swagger2.annotations.EnableSwagger2;
  12. /**
  13. * @author chenkx
  14. * @date 2017-12-26
  15. */
  16. @SpringBootApplication
  17. @MapperScan(basePackages = {"com.iformall.mapper"})
  18. @EnableSwagger2
  19. @EnableRocketMQ
  20. @EnableEncryptableProperties
  21. @EnableAspectJAutoProxy(exposeProxy = true)
  22. public class ConsumerApplication {
  23. @Value("${fm.exception}")
  24. private boolean fmException;
  25. @Value("${fm.exception_emails}")
  26. private String fmExceptionEmails;
  27. @Value("${fm.open}")
  28. private boolean fmOpen;
  29. @Value("${fm.upload_dir}")
  30. private String uploadDir;
  31. @Value("${fm.videoType}")
  32. private String videoType;
  33. @Bean
  34. public boolean isFmException() {
  35. return fmException;
  36. }
  37. @Bean
  38. public String fmExceptionEmails() {
  39. return fmExceptionEmails;
  40. }
  41. @Bean
  42. public boolean isFmOpen() {
  43. return fmOpen;
  44. }
  45. @Bean
  46. public String fmUploadDir() {
  47. return uploadDir;
  48. }
  49. @Bean
  50. public String videoType() {
  51. return videoType;
  52. }
  53. public static void main(String[] args) {
  54. ConfigurableApplicationContext context = SpringApplication.run(ConsumerApplication.class, args);
  55. // FmInsideCouponVerifyMsg verifyMsg = new FmInsideCouponVerifyMsg();
  56. // verifyMsg.setMsgType(EnumMsgRecordType.INSIDE_COUPON_VERIFY.getCode());
  57. // //verifyMsg.updateTenantInfo(tenantEntity);
  58. // verifyMsg.setTenantId("789");
  59. // verifyMsg.setCouponOrderId(436060427278385152L);
  60. // verifyMsg.setBUserId(435982884998905856L);
  61. // try {
  62. // context.getBean(FmInsideCouponVerifyMsgServiceImpl.class).send(verifyMsg);
  63. // } catch (BeansException e) {
  64. // // TODO Auto-generated catch block
  65. // e.printStackTrace();
  66. // } catch (Exception e) {
  67. // // TODO Auto-generated catch block
  68. // e.printStackTrace();
  69. // }
  70. }
  71. }