0
点赞
收藏
分享

微信扫一扫

第二十八章 配置 Web Gateway 的默认参数 - 与 IRIS 的连接

Go_Viola 03-22 07:00 阅读 5

1、写一个 starter 项目,一般是一个空壳,里面不写代码,主要起到依赖其他项目的作用;

2、写一个真正实现自动装配逻辑的项目,在项目 classpath 下写一个 META - INF / spring . factories 文件;
3、在 spring . factories 中添加配置:
 org . springframework . boot . autoconfigure . EnableAutoConfiguration = com . bjpowernode . xxxConfiguration 
4、 xxxConfiguration 类需要添加注解@ Configuration ;
5、 xxxConfiguration 类一般也会使用@ Conditional 来适应不同的环境;
6、在 xxxConfiguration 类中编写具体代码实现自动化配置,给使用者把该配的配置好,让别人可以直接使用;
 

举报

相关推荐

0 条评论