
LATEST POSTS
浏览图集 →最新文章
springboot JPA为字段设置默认值
在使用JPA时,如果需要为属性设置默认值,很自然的,你可能会想到用下面的方式。@Columnprivate Integer state=0;但很不幸的是,这种方
PHP使用strtotime("-1 month", time())得到上个月是错的
今天是3月30号,使用strtotime得到的不是2月份,而是3月份。解决方法是可以把时间戳先转换成年月,$t = date(Y-m);然后再使用strtoti
thymeleaf 模板布局 - 引入公共header
通过th:fragment标签定义一个模板,如果是引入整个页面,这个模板标签则不是必须的,它的作用是让其他页面可以包含某个页面的某个代码片段,通过模板ID区分。
java获取当前时间(时间戳)的方法
获取当前时间戳(毫秒级)//方法 一System.currentTimeMillis();//方法 二Calendar.getInstance().getTim
springboot 控制器controller内跳转页面的方法
直接上代码:public String index() { return \"redirect:/list\";}
SpringbootJPA分页 PageRequest过时替换方法
SpringbootJPA分页 PageRequest过时替换方法Pageable pageable = new PageRequest;替换成:Pageabl
springboot thymeleaf时间戳转换
or
Springboot 编码规范
公共组件项目,通常会创建一个Maven普通项目。服务组件项目,通常会创建一个Maven聚合项目,并在聚合项目目录下创建多个继承Maven聚合项目的Maven模块
springboot 获取接口请求中的参数(@PathVariable,@RequestParam,@RequestBody)
一:获取参数SpringBoot提供的获取参数注解包括:@PathVariable,@RequestParam,@RequestBody,三者的区别如下表:
springboot 判断当前请求类型
public void test(HttpServletRequest request){ System.out.println(request.
spring-boot工程中,jpa下hibernate的ddl-auto的各种属性
jpa: hibernate: ddl-auto: create撒大声地ddl-auto:create ---- 每次运行该程序,没有表格会新建表格,表
springboot java.util.NoSuchElementException: No value present 异常处理
optionalT.get(): null;
Spring JPA Repository 实例教程文档
在查询时,通常需要同时根据多个属性进行查询,且查询的条件也格式各样,Spring Data JPA 为此提供了一些表达条件查询的关键字,大致如下:
java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized...
java.sql.SQLException: The server time zone value ú±ê×± is unrecognized or repre


