Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

88 строки
2.6 KiB

  1. package com.iformall;
  2. import com.iformall.domain.po.msg.FmInsideCouponVerifyMsg;
  3. import com.iformall.enums.EnumMsgRecordType;
  4. import com.iformall.service.msg.impl.FmInsideCouponVerifyMsgServiceImpl;
  5. import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
  6. import org.mybatis.spring.annotation.MapperScan;
  7. import org.rocketmq.starter.annotation.EnableRocketMQ;
  8. import org.springframework.beans.BeansException;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.beans.factory.annotation.Value;
  11. import org.springframework.boot.SpringApplication;
  12. import org.springframework.boot.autoconfigure.SpringBootApplication;
  13. import org.springframework.context.ConfigurableApplicationContext;
  14. import org.springframework.context.annotation.Bean;
  15. import springfox.documentation.swagger2.annotations.EnableSwagger2;
  16. /**
  17. * @author chenkx
  18. * @date 2017-12-26
  19. */
  20. @SpringBootApplication
  21. @MapperScan(basePackages = {"com.iformall.mapper"})
  22. @EnableSwagger2
  23. @EnableRocketMQ
  24. @EnableEncryptableProperties
  25. public class ConsumerApplication {
  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.videoType}")
  35. private String videoType;
  36. @Bean
  37. public boolean isFmException() {
  38. return fmException;
  39. }
  40. @Bean
  41. public String fmExceptionEmails() {
  42. return fmExceptionEmails;
  43. }
  44. @Bean
  45. public boolean isFmOpen() {
  46. return fmOpen;
  47. }
  48. @Bean
  49. public String fmUploadDir() {
  50. return uploadDir;
  51. }
  52. @Bean
  53. public String videoType() {
  54. return videoType;
  55. }
  56. public static void main(String[] args) {
  57. ConfigurableApplicationContext context = SpringApplication.run(ConsumerApplication.class, args);
  58. // FmInsideCouponVerifyMsg verifyMsg = new FmInsideCouponVerifyMsg();
  59. // verifyMsg.setMsgType(EnumMsgRecordType.INSIDE_COUPON_VERIFY.getCode());
  60. // //verifyMsg.updateTenantInfo(tenantEntity);
  61. // verifyMsg.setTenantId("789");
  62. // verifyMsg.setCouponOrderId(436060427278385152L);
  63. // verifyMsg.setBUserId(435982884998905856L);
  64. // try {
  65. // context.getBean(FmInsideCouponVerifyMsgServiceImpl.class).send(verifyMsg);
  66. // } catch (BeansException e) {
  67. // // TODO Auto-generated catch block
  68. // e.printStackTrace();
  69. // } catch (Exception e) {
  70. // // TODO Auto-generated catch block
  71. // e.printStackTrace();
  72. // }
  73. }
  74. }