SpringBoot
Komorebis.
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SpringBoot实体类大小写转换
实体类中写的是大写,为什么会自动转换为小写呢?springboot在进行序列化和反序列时对字段进行了处理。实体类字段:测试返回字段: 解决方法:在字段中加上注解@JsonProperty,返回结果集就没问题了。 重启项目,重新访问:原创 2022-12-05 11:12:11 · 1507 阅读 · 0 评论 -
SpringBoot中JSON时间转换为东八区
###如果有不对的地方还请大家多多指点、留言,有更好的方法也欢迎大家留言评论。解决方法:可以在实体类中,通过@JsonFormat来进行单独转换。来进行json格式的时间转换,发现时间转换的不正确。需要把.yml文件中的time-zone注释掉。原创 2022-11-25 14:58:07 · 970 阅读 · 0 评论 -
SpringBoot-Jpa报错:maybe not public or not valid?
访问项目时发现报错:org.springframework.expression.spel.SpelEvaluationException: EL1008E: Property or field 'movieid' cannot be found on object of type 'com.ytc.model.Movie' - maybe not public or not valid?生成GetSet方法后,重启项目,重新访问。通过检查实体类发现是忘记生成GetSet方法。原创 2022-10-19 21:57:58 · 3026 阅读 · 0 评论 -
springBoot报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
1、springBoot配置完成后运行SpringbootMybatisApplicationTests中的contextLoads方法报错。4、修该后再次运行SpringbootMybatisApplicationTests中的contextLoads方法。2、报错信息,大概意思就是绑定无效,找不到mapper.ShopMapper.queryShopList方法。因为我这里是把*.xml文件直接放在了mapping下,所以修该为mapping/*.xml。原创 2022-10-16 20:25:36 · 1272 阅读 · 0 评论 -
SpringBoot报错:Error creating bean with name ‘shopsController‘
1、先看看Service层类上的注解有没有加上或者是加错,应给是@Service,注解是否引用了Spring类,不要导成别的包了,看清包的路径。2、还有就是如果Service层分成了接口和实现类看看实现类有没有加注解(@Service),看看有没有实现类。原创 2022-10-16 23:43:01 · 605 阅读 · 0 评论 -
java: 程序包org.springframework.beans.factory.annotation不存在。
1、选中file中的Settings。2、找到Maven,勾选always update snapshots,然后Apply>Ok。3、最后把pom.xml文件的依赖,全部剪切再重新复制进去,刷新导入即可。(或者重启一下Idea,我就是重启后没问题了)。原创 2022-10-16 23:39:35 · 11900 阅读 · 0 评论 -
SpringBoot查询数据库信息,前台展示
SpringBoot查询原创 2022-10-16 23:32:53 · 5458 阅读 · 0 评论
分享