随笔分类 -  springboot

摘要:springcloud 使用eureka无法注入DiscoveryClient,可能因为是导包错误 导包情况 导入正确的DiscoveryClient即可自动注入 参考帖子:Could not autowire. No beans of 'DiscoveryClient' type found. 阅读全文
posted @ 2020-07-15 11:19 AlphaJunS 阅读(411) 评论(0) 推荐(0) 编辑
摘要:时区问题造成的,解决方法是在数据源配置文件中在数据库链接处增加参数&serverTimezone=GMT%2B8对时区进行配置,配置为东八区。 修改前:spring.datasource.url=jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&cha 阅读全文
posted @ 2019-05-04 16:41 AlphaJunS 阅读(283) 评论(0) 推荐(0) 编辑
摘要:新建的springboot项目启动后,无法访问到controller 页面是404错误 查看项目结构,发现是新建工程的启动类位置有问题,controller类应该位于引导类的同级包或者子级包中。需要将下图的引导类放在com.alphajuns包下即可访问controller 阅读全文
posted @ 2019-05-04 16:26 AlphaJunS 阅读(2284) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示