
spingboot
barni
这个作者很懒,什么都没留下…
展开
-
Swagger技术
1、是API框架2、RestFul Api文档在线自动生成工具=>Api文档与APO定义同步更新3、直接运行,可以在线测试怎样使用?1、导入包 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>原创 2021-09-24 08:55:02 · 93 阅读 · 0 评论 -
导入静态资源
方式一、webjars方式二、总结原创 2021-09-22 22:44:13 · 107 阅读 · 0 评论 -
spingbook自动装配,可以配置的内容
原创 2021-09-22 22:29:24 · 93 阅读 · 0 评论 -
多环境配置及配置文件路径
可以放以上多个文件夹,优先级是最高到最低。2、多环境配置,选择激活其中一个3、yaml格式,多文本用----隔开。原创 2021-09-22 22:28:15 · 127 阅读 · 0 评论 -
jsr303校验
@validated //数据校验用法:原创 2021-09-22 21:40:20 · 80 阅读 · 0 评论 -
spring后台模板
搜索:bootstarap模板原创 2021-09-22 10:37:56 · 80 阅读 · 0 评论 -
springbook拓展功能
原创 2021-09-22 10:10:58 · 83 阅读 · 0 评论 -
thymeleaf模板引擎
https://github.com/thymeleaf/thymeleafhttps://github.com/thymeleaf/thymeleaf 1.引入依赖springboot直接引入: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId&原创 2021-09-22 09:26:44 · 84 阅读 · 0 评论 -
yaml语法
server: port: 8080 name: xiao1、server是实体类2、属性值冒号后,用空格分开。注意:属性和值的大小都是十分敏感的。对空格要求非常高。字符串默认不用加双引号,单引号。给属性赋值;1、属性上面加@component 给spring添加组件。方法一、@value(“hua”) 直接在类属性上,添加数值方法二、在类上面添加@configurationProperties(prefix = "server")绑定的是yaml文.原创 2021-09-19 21:47:15 · 345 阅读 · 0 评论