![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SpringCloud
七连的最后一个士兵
一个喜欢健身 热爱生活 喜欢繁华的城市 喜欢旅游的 程序猿
展开
-
Springcloud报错:Action: Consider defining a bean of type ‘com.XXX.dao.XXXDao‘ in your configuration
Springcloud报错:Action: Consider defining a bean of type ‘com.XXX.dao.XXXDao’ in your configuration 在主启动类上加上:@ComponentScan(basePackages = {“com.XXX.XXX.dao”}) 你的项目的dao层包路径 @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) @EnableFeignClie原创 2020-09-25 11:50:36 · 2020 阅读 · 0 评论 -
sentinel自定义限流方法与业务代码解耦合
sentinel自定义限流方法与业务代码解耦合 在学习alibaba 的sentinel ,遇到了一个很小但是容易犯的小错误,记录一下 使用自定义的 限流方法,并且与业务代码解耦合,主业务方法: // 自定义 解耦限流方法 :指定那个类 下的 哪一个方法 是限流触发后 要执行的方法 @GetMapping("/customerblockHandler") @SentinelResource( value = "customerblockHandler",blockHandlerClass原创 2020-09-21 15:41:52 · 1326 阅读 · 0 评论 -
springcloud配置中心客户端中的bootstrap.yml 配置无效
springcloud配置中心客户端中的bootstrap.yml 配置无效 springcloud配置中心客户端中的bootstrap.yml 是系统级别 优先级比 application.yml 高。 但是在启动测试的时候 莫名的发生了配置的错误,和bootstrap.yml 中的 配置完全不一样,微服务名称 端口号 都和github远程仓库中对应的yml文件一致,搞了很久 ,没搞明白。 同事看了下 ,单独启动 可以正确读取 yml 配置文件,又 测试 先启动 配置中心server端 再启动客户端 ,配原创 2020-09-08 14:41:31 · 2964 阅读 · 5 评论