原因: pom没有加没有加thymleaf的依赖
转载: http://www.javashuo.com/article/p-uwfivquq-em.html
解决: pom中加入
<!--使用thymeleaf模板引擎-->
<dependency>
<groupId>org...
原因: Pojo类名忘记加了 ENtity
转载: https://blog.csdn.net/ywy7777777/article/details/106679001/
转载: https://www.codenong.com/34702252
不需要强制转换,也不推荐强制转换,只需要在repositery中重写方法.
转载:https://blog.csdn.net/weixin_45848260/article/details/124214797
把UTF-8改成 utf8就行
原因:xml文件开篇第一个元素前面不能有空格
转载:https://blog.csdn.net/a_cherry_blossoms/article/details/86589479
转载自:https://blog.csdn.net/qq_44982182/article/details/108812770
转载自: https://www.csdn.net/tags/MtTaMgysMTA0NjktYmxvZwO0O0OO0O0O.html
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.SpringBootVersion;
impo...
访问路径前记得加 / 例如:"/index"
请求方法method "GET,PUT,DELETE...."等,注意父路径是否已经被定义
原因:
出现 - no Session 是因为hibernate需要事务
解决方法:
我们在方法上添加注解
@Transaction
@Rollback(false) 这个是在测试类中防止回滚用的
在使用JPA的多对一,进行保存等操作的时候报错.
显示对象未被创建.
原因是
在@ManyToOne()中缺少cascade = {CascadeType.REMOVE,CascadeType.PERSIST}
在@OneToMany()中 例如:private Role role=new Role(); 在这里是不能new的
解决办法:
https://...
https://blog.csdn.net/weixin_39098944/article/details/110137410
使用的时 idea 2022版本
解决办法
Edit Configuration 下的SpringBoot启动器的 working directory
为$MODULE_WORKING_DIR$
结果
并行:多个人自己做自己的事,互不干扰.
并发:多个人共同做一件事.