摘要: 推荐 :https://github.com/zouzg/mybatis-generator-gui 阅读全文
posted @ 2020-02-23 13:20 残酷159 阅读(94) 评论(0) 推荐(0)
摘要: 目标 : 将如下数据表中的数据提供接口查询出来 。 表名 : examples 步骤 一、配置mybatis依赖jar包 ,mysql驱动jar包 <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis- 阅读全文
posted @ 2019-12-02 18:04 残酷159 阅读(689) 评论(0) 推荐(0)
摘要: controller 属于SpringMVC的产物 ,如果配置了controller,就必须配置全局的异常处理类、视图解析器 。 controller默认返回的结果被试图解析器解析到指定的视图中,再返回给界面 。 如果再添加上@responseBody ,则直接返回JSON结果到前台 ,就等于res 阅读全文
posted @ 2019-11-22 13:57 残酷159 阅读(129) 评论(0) 推荐(0)
摘要: springboot中,使用SchedulingConfigurer能设置定时器下次的执行时间 。 至于运行时动态修改,那么目前最常用的有3种方式 : 1、 接口 2、数据库 3、配置中心热更新 这里给大家弄个接口示例 。 package com.example.demo.javaConfig; i 阅读全文
posted @ 2019-11-22 11:44 残酷159 阅读(2040) 评论(0) 推荐(0)
摘要: springboot大大的简化了以往的spring对定时器的配置。现在配置定时器仅仅需要2步 : 1、在application启动类中添加注解@EnableScheduling package com.example.demo; import org.springframework.boot.Spr 阅读全文
posted @ 2019-11-21 16:44 残酷159 阅读(320) 评论(0) 推荐(0)
摘要: springboot启动图,由spring.banner的一系列参数进行控制 。 最重要2个参数 spring.banner.location=classpath:banner.txtspring.banner.image.location=classpath:banner.gif所以我们只需要把自 阅读全文
posted @ 2019-11-21 11:24 残酷159 阅读(822) 评论(0) 推荐(0)
摘要: 在pom.xml中的properties节点下添加skipTests 。 <properties> <java.version>1.8</java.version> <skipTests>true</skipTests> </properties> 阅读全文
posted @ 2019-11-19 14:02 残酷159 阅读(162) 评论(0) 推荐(0)
摘要: 1、打开IDEA , 进入File.New.Project 2、在Project界面,选择Spring Initializr ,然后选择本地JDK 和 服务初始化路径https://start.spring.io ,点击Next进入下一步 3、继续选择项目名称,打包方式。 因为springboot自 阅读全文
posted @ 2019-11-19 11:44 残酷159 阅读(392) 评论(0) 推荐(0)