会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
1点
博客园
首页
新随笔
联系
管理
上一页
1
···
15
16
17
18
19
20
21
22
23
···
77
下一页
2020年3月3日
Spring Boot Devtools 热部署依赖
摘要: 1.添加依赖 <!--热部署--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> </dependency> 2.重新启动项目 3.测试 在
阅读全文
posted @ 2020-03-03 21:05 1点
阅读(282)
评论(0)
推荐(0)
2020年3月1日
SpringBoot 整合 thymeleaf
摘要: 1. pom.xml 加入 Thymeleaf 启动器 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependen
阅读全文
posted @ 2020-03-01 19:18 1点
阅读(125)
评论(0)
推荐(0)
spring boot 静态资源的映射规则 (3) 欢迎页面映射
摘要: 欢迎 页面映射 会从 4个静态资源目录 + 根路径 / 中 查找 index.html 页面 会在 静态资源目录下 与 根路径查找 (按该顺序) index.html页面; 收到 "/**" 请求映射 访问 localhost:8080/ 会在上面5个目录中查找 index.html 页面(因为/也
阅读全文
posted @ 2020-03-01 12:04 1点
阅读(250)
评论(0)
推荐(0)
spring boot 静态资源的映射规则 (2) 替他资源映射
摘要: 1.如果不是 /webjars/** 资源 if (!registry.hasMappingForPattern("/webjars/**")) { this.customizeResourceHandlerRegistration(registry.addResourceHandler(new S
阅读全文
posted @ 2020-03-01 11:48 1点
阅读(380)
评论(0)
推荐(0)
spring boot 静态资源的映射规则 (1) webjars 资源映射
摘要: 我们可以在 WebMvcAutoConfiguration 这个类下查找一个方法 addResourceHandlers public void addResourceHandlers(ResourceHandlerRegistry registry) { if (!this.resourcePro
阅读全文
posted @ 2020-03-01 11:32 1点
阅读(262)
评论(0)
推荐(0)
2020年2月29日
spring boot 日志配置 默认的日志配置
摘要: pringBoot默认配置好了日志, 只要启动 Spring Boot 项目就会在控制台输出日志信息。 实际开发中我们不需要直接添加该依赖,你会发现spring-boot-starter其中包含了 spring-boot-starter-logging, 该依赖内容就是 Spring Boot 默认
阅读全文
posted @ 2020-02-29 22:32 1点
阅读(1170)
评论(0)
推荐(0)
Profile 多环境支持
摘要: Profifile 多环境支持 用于针对不同的环境进行不同的配置 比如线下环境 和 生产环境 现在我们有个小案例进行演示 1.在 resource文件夹下 创建 application-prod.properties server.port=8081 application-dev.properti
阅读全文
posted @ 2020-02-29 18:05 1点
阅读(152)
评论(0)
推荐(0)
yaml 语法使用
摘要: 1.添加Bean package com.example.boot2.demo.bean; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.s
阅读全文
posted @ 2020-02-29 13:20 1点
阅读(287)
评论(0)
推荐(0)
YAML语法
摘要: YAML语法格式 key: value 表示一对键值对(冒号后面必须要有空格) 使用空格缩进表示层级关系 左侧缩进的空格数目不重要,只要同一层级的元素左侧对齐即可 key 与 value 大小写敏感 YMAL常用写法 字面量: 数值,字符串,布尔,日期 字符串 默认不用加上引号; “” 使用 双引号
阅读全文
posted @ 2020-02-29 10:45 1点
阅读(172)
评论(0)
推荐(0)
2020年2月25日
nginx 启动出现 [error] open() "/usr/local/nginx/logs/nginx.pid" failed (2: No such file or directory)
摘要: 1.nginx 启动出现: 2.打开nginx.conf配置文件,把下面红色部分打开,重启服务器或者重新加载配置文件,这样nginx.pid路径就更改成功! 3. 在sbin/ 路径下执行 ./nginx -c /usr/local/nginx/conf/nginx.conf 出现问题 这个问题是端
阅读全文
posted @ 2020-02-25 22:27 1点
阅读(2201)
评论(0)
推荐(0)
上一页
1
···
15
16
17
18
19
20
21
22
23
···
77
下一页
公告