随笔分类 - spring boot
摘要:pojo: 保存示例: 查询示例:
        阅读全文
            
摘要:https://blog.csdn.net/u011781521/article/details/72210980 JPA提供的四种标准用法为TABLE,SEQUENCE,IDENTITY,AUTO. TABLE:使用一个特定的数据库表格来保存主键。 SEQUENCE:根据底层数据库的序列来生成主键
        阅读全文
            
摘要:Repository接口 提供了按方法名称的查询方式; 提供了@Query的查询方式 可能遇到的错误: 1)Caused by: javax.persistence.TransactionRequiredException: Executing an update/delete query(手动加@
        阅读全文
            
摘要:org.springframework.boot spring-boot-starter-thymeleaf org.springframework.boot spring-boot-starter-web ...
        阅读全文
            
摘要:添加配置类,初始化RedisTemplate 测试类
        阅读全文
            
摘要:cd redis-3.0.0/ make:编译。(提示没有权限,所以要修改/etc/sudoers文件,该文件是只读的,所以要用visudo -f /etc/sudoers编辑,yy是复制整行,p是粘贴,dd是剪切整行,esc是命令模式,i是插入模式。) make PREFIX=/user/loca
        阅读全文
            
摘要:@Cacheable的使用 @CacheEvict:清除缓存
        阅读全文
            
摘要:package com.example.zs; import com.example.zs.mapper.UserMapper; import com.example.zs.pojo.User; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.ann...
        阅读全文
            
摘要:异常流程 :controller-ControllerAdvice-异常解析器-默认的error页面 1.错误页面error.html: 程序出现异常会自动跳到error.html里,视频效果,该页面可以使用th:text="${exception}"显示异常信息,但自己测试时,页面成功显示,但异常
        阅读全文
            
摘要:1.实体类属性上添加注解规则 如
        阅读全文
            
摘要:<font color="red" th:text="开始了">font外</font>页面显示红色字体 开始了 (同时存在,则前者覆盖了后者,总的来说是以前者为准) <font color="red" >font外</font> 页面显示红色字体 font外 <font color="red" t
        阅读全文
            
摘要:数据库配置如下 项目结构图 遇到的错误:invalid bound statement (not found) --mapper文件没有配置。 注解点
        阅读全文
            
摘要:绝对路径格式:th:href="@{http://www.baidu.com}"
        阅读全文
            
摘要:遍历 list如下 th:each th:each 状态变量 var 遍历map如下(需要双层遍历) controller代码如下
        阅读全文
            
摘要:th:if th:switch
        阅读全文
            
摘要:回到idea正常界面,Mac使用快捷键shift+option+command+/,window上的快捷键是Shift+Ctrl+Alt+/,打开Registry,勾选 compiler.automake.allow.when.app.runningcompiler.automake.allow.w
        阅读全文
            
摘要:例如meta标签,低版本标签必须要闭合,高版本不用这么严格。 pom文件引入高版本jar包如下,propertis里添加:
        阅读全文
            
 
                    
                 浙公网安备 33010602011771号
浙公网安备 33010602011771号