1:导入文件注解
@RequestMapping(value = "/pay/importExcelPurchaseInfo", method = RequestMethod.POST, produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@Scope("prototype") @Primary @Configuration class MultipartSupportConfig { @Autowired private ObjectFactory<HttpMessageConverters> messageConverters; @Bean public Encoder feignFormEncoder() { return new SpringFormEncoder(new SpringEncoder(messageConverters)); } }
2:事务注解
@Transactional(rollbackForClassName = {"Exception"})
3:时间注解
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")