记录一下自己最近配置nacos遇到的坑

1、nacos配置,datasource,redis配置最好放在bootstrap中,这样打包的时候更改bootstrap会把bootstrap打包进去,在切换环境时比较方便。

2、application转bootstrap出现了程序没有访问bootstrap的情况,暂时采用了网上提供的方法,导入

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>

这个依赖,但是其他的module都没有用到,所以还要再深入研究一下

posted @ 2022-03-30 01:13  Frank_Z9  阅读(136)  评论(0)    收藏  举报