![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SpringBoot
隔壁村的朋于晏
这个作者很懒,什么都没留下…
展开
-
使用springcloud的feign远程调用技术出现了找到不到接口
使用远程调用时出现了一个这样的问题,找了半天,接口上也写注解了,就是现实找不到,后来才发现是在启动类上使用了@FeignClient,而没有使用@EnableFeignClients这个注册的导致的;一定要仔细原创 2020-07-21 18:19:29 · 1989 阅读 · 0 评论 -
使用feign做远程过程调用时出现: ‘url‘ attribute is not specified and no embedded datasource could
最近在远程调用过程中出现了:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.但是实际上我并没有做数据库相关的任何操作,出现此错误导致项目无法启动检查原因:可能是在导入依赖的时候导入的关于数据库的依赖,由于springboot的自动配置原理导致的错误!<dependency> <groupI原创 2020-07-13 20:35:19 · 367 阅读 · 0 评论 -
No primary or default constructor found for interface java.util.List
No primary or default constructor found for interface java.util.ListTbBrand tbBrand, @RequestParam(value = "cids") List<Long> cids添加@RequestParam注解即可;原创 2020-07-06 20:09:58 · 633 阅读 · 0 评论 -
关于springboot的将自建user对象交给springboot容器管理时出现的小问题
今天在复习springboot时,出现了一个小小的一个bug,特此记录一下,我也不知道怎么回事。当我在resource目录下书写user.properties时,我使用user.name=XXX时,竟然解析不到我的name值!然后我换成其他的属性比如user.names时就可以解析到该属性了。具体如下在user.properties中书写user.name:在配置类中使用该配置:可以看到并没有解析到当我使用user.names时:在配置类中使用该属性可以看到这时已经读取到了这里原创 2020-07-03 10:01:43 · 3254 阅读 · 0 评论 -
SpringBoot的自动配置原理简单了解
(1)进入启动类:(2)点击@SpringBootApplication注解(3)点击@EnableAutoConfiguration注解(4)点击AutoConfigurationImportSelector.class类(5)找到getCandidateConfigurations这个方法(6)点击SpringFactoriesLoader类(7)会加载META-INF/spring.factories文件,查看这个文件;在spring-boot-autoconfigure这原创 2021-03-25 11:37:55 · 152 阅读 · 0 评论