每日一BUG
一只努力的妲妲
这个作者很懒,什么都没留下…
展开
-
解决Please set spring.main.web-application-type=reactive or remove spring-boot-starter-web dependency.
原因很明显:SpringMVC和SpringCloudGateway不共存,但是我子项目pom文件根本没有spring-boot-starter-web,是从父项目继承过来的。解决方法①:在application.yml添加spring.main.web-application-type=reactive。解决方法②:用exclusions排除spring-boot-starter-web依赖。知识点:exclusions的应用。gateway运行时报错。原创 2024-01-25 18:19:45 · 1866 阅读 · 0 评论 -
解决 Failed to start bean ‘webServerStartStop‘; nested exception is java.lang.reflect.UndeclaredThrowa
解决方法:查看IDEA中的。原创 2024-01-21 20:15:12 · 1275 阅读 · 1 评论 -
解决Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource
类,DataSourceAutoConfiguration类使用了@Configuration注解向spring注入了dataSource bean。因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错。学习微服务拆分时,启动csmall-business(购买业务)时报错。spring boot默认会加载。原创 2024-01-14 23:32:08 · 542 阅读 · 1 评论