spring boot常见错误

课设进行到末尾,使用过程中遇到了一些错误,这里记录一下

  1. Failed to start component [Connector[HTTP/1.1-80]]::端口被占用,yml配置文件更改端口
  2. CLIENT_PLUGIN_AUTH is required] with root causeMySQL版本问题,pom更改版本依赖
  3. useUnicode=true&characterEncoding=utf-8 :设定时区时,serverTimezone=UTC比中国时间早8个小时,
    若在中国,可设置serverTimezone=Shanghai或者serverTimezone=Hongkong
  4. Error creating bean with name 'userController' 加扫描 @ComponentScan(basePackages = { “com.example.controller” })
  5. Field userServiceImpl in com.hxz.controller.UserController required a bean of type 'com.hxz.service. 加包扫描 @ComponentScan(basePackages = { "com.example.service.impl })
  6. The Tomcat connector configured to listen on port 8081 failed to start. The port may already be in use or the connector may be misconfigured. 更改端口号
  7. 错误: 找不到或无法加载主类 com.hxz.SpringBootBlogApplication :右击pom,选择maven clean再点击maven install
  8. springboot 控制台debug sql logging.level.com.hxz.mapper=debug 其中logging.level.com.你的Mapper包=日志等级
  9. attempted to return null from a method with a primitive return type (int). mapper文件返回值问题,注意是int还是String类型
  10. Unable to infer base url. This is common when using dynamic servlet registration or when the API is (swagger错误)启动类加EnableSwagger2注解
  11. springboot集成thymeleaf中遇到不能返回页面,只返回字符串。 原因:在controller中使用了注解@RestController修改:修改注解为@Controller
  12. `io.lettuce.core.RedisCommandTimeoutException: Command timed out
    连接超时时间设置的过于短暂(我这边设置成了0),修改为5000左右即可
    (spring.redis.timeout=50000)

`

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值