@Controller(value=“名字”,descripation="描述",tags="具体" )

@RestController控制器(path="",product="charset utf-8")

@AutoWired

     

swagger用法  

      @API(方法)

         @ApiOperation

         @getMapping

        @HystrixCommand(熔断)

@Service服务 方法

    @Service

    @AutoWired

   @Transactional 事物(value="transactionManagerApp")

@Profile({" "})

指定读取那个yml文件

@ConfigurationProperties(prefix=" ")

指定自动读取yml文件的位置

@Async

异步处理逻辑 返回类型Future map<>

线程池配置 实现AsyncConfigurer接口 重写 getAsyncExecutor()方法

实例化ThreadPoolTaskExecutor 设置最小线程CorePoolSize  最大线程MaxPoolSize 等待队列 QueueCapacity 超时AwaitTerminationSeconds

线程池关闭时等待所有任务完成继续再继续销毁其他bean WaitForTasksToCompleteOnShutdown(true)     initialize 

 @ComponentScan(basePackage = {"com.xxx"})

扫描包

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-06-02
  • 2021-09-25
  • 2022-01-15
  • 2022-12-23
  • 2021-10-22
猜你喜欢
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-12-13
  • 2021-10-20
  • 2022-12-23
相关资源
相似解决方案