Spring Boot
cooling_time
这个作者很懒,什么都没留下…
展开
-
在html5在引入js文件时ChromeF12得到的js文件自己写得js文件内容不一样
主要是chrome的缓存问题,F12后过程如下原创 2020-05-06 00:12:57 · 305 阅读 · 0 评论 -
springboot的MyBatis自定义别名
先在application.properties(yml)中写入别名扫描mybatis: type-aliases-package: com.zws.taskprocessmanager.pojo在实体类上加入@Alias注解@Alias("user")public class User { private String id; private String ...原创 2020-04-20 17:53:43 · 827 阅读 · 0 评论 -
springboot的restful风格
restfulCRUD:Rest风格URL:/资源名称/资源标识 HTTP请求方式区分CRUD操作操作普通CRUDRestfulCRUD查询getEmpemp–GET添加addEmp?xxxemp–POST修改updateEmp?id=xxx&xxx=xxemp/{id}–PUT删除deleteEmp?id=1emp/{id}...原创 2020-04-20 17:48:18 · 78 阅读 · 0 评论 -
springboot热部署WEB项目
禁用thymeleaf缓存 #禁用缓存 thymeleaf: cache: false设置idea自动编译问题:ctrl+F9就可以解决原创 2020-04-18 01:38:41 · 166 阅读 · 0 评论 -
Thymeleaf使用
@ConfigurationProperties(prefix = "spring. thymeleaf" )public class ThymeleafProperties {private static final Charset DEFAULT_ ENCODING = Charset. forName("UTF-8");private static final MimeType DEF...原创 2020-04-16 19:25:26 · 76 阅读 · 0 评论 -
springboot日志
slf4j接口与实现jar关系slf4j官方用户手册统一日志记录:参考这个手册用中间包天环原有日志框架例如Spring的jcl变为jcl-over-slf4j.jarspringboot管理日志框架的关系图springboot是使用slf4j+logback进行日志记录。替换其他的日志框架在application.yml中调整如何指定:logging.level.com.*=t...原创 2020-04-16 18:41:49 · 93 阅读 · 0 评论 -
spring boot的使用
@PropertySource(value = “classpath:users.properties”)//引用properties配置文件@ConfigurationProperties(prefix = “users”)//从全局文件中获取值@ImportResource//导入spring配置文件springboot更推荐使用全注解的方式添加组件建立配置类,在配置类中加入@Conf...原创 2020-04-14 19:09:11 · 125 阅读 · 0 评论 -
YAML语法
yaml对于springboot全局属性设置的配置详情可查看链接属性对应,下面分析的是书写规则。一、基础k:(这里必须有空格)v:键值对主要用缩进控制层级二、值字面量:值(int/char/boolean…)字符串默认不用加上单双引号。“”:不会转义字符串 例如:“chifan \n cai”输出为:chifan (换行)cai‘’:会转义对象:标准写法:user: nam...原创 2020-04-13 18:10:43 · 210 阅读 · 0 评论 -
springboot环境搭建
英文能力足够的(官方指导):boot环境搭建如果懒得看,那就继续看下面…一、软件环境jdk:1.8以上maven:3.2以上IDEA:个人建议2017以上springboot:2.2.2二、环境搭建2.1 先导入依赖pom.xml:<parent> <groupId>org.springframework.boot</groupId>...原创 2020-04-13 17:19:22 · 997 阅读 · 0 评论