小编Ami*_*ari的帖子

仅为嵌入式tomcat或嵌入式服务器创建Bean

如果应用程序在嵌入式容器中运行,我希望创建 @Bean。如果应用程序在外部 tomcat 上运行,则不应创建该 bean。有什么办法我们可以创建 @Conditional 注释来仅当应用程序在嵌入式 tomcat 中运行时创建 bean。

spring-boot

5
推荐指数
1
解决办法
1509
查看次数

标签 统计

spring-boot ×1