Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

81 linhas
2.4 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. @Bean
  35. public boolean isFmException() {
  36. return fmException;
  37. }
  38. @Bean
  39. public String fmExceptionEmails() {
  40. return fmExceptionEmails;
  41. }
  42. @Bean
  43. public boolean isFmOpen() {
  44. return fmOpen;
  45. }
  46. @Bean
  47. public String fmUploadDir() {
  48. return uploadDir;
  49. }
  50. public static void main(String[] args) {
  51. ConfigurableApplicationContext context = SpringApplication.run(ConsumerApplication.class, args);
  52. // FmInsideCouponVerifyMsg verifyMsg = new FmInsideCouponVerifyMsg();
  53. // verifyMsg.setMsgType(EnumMsgRecordType.INSIDE_COUPON_VERIFY.getCode());
  54. // //verifyMsg.updateTenantInfo(tenantEntity);
  55. // verifyMsg.setTenantId("789");
  56. // verifyMsg.setCouponOrderId(436060427278385152L);
  57. // verifyMsg.setBUserId(435982884998905856L);
  58. // try {
  59. // context.getBean(FmInsideCouponVerifyMsgServiceImpl.class).send(verifyMsg);
  60. // } catch (BeansException e) {
  61. // // TODO Auto-generated catch block
  62. // e.printStackTrace();
  63. // } catch (Exception e) {
  64. // // TODO Auto-generated catch block
  65. // e.printStackTrace();
  66. // }
  67. }
  68. }