![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
weixin_44535446
这个作者很懒,什么都没留下…
展开
-
spring boot web开发之thymeleaf抽取公共元素
抽取公共片段<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0" th:fragment="topbar">引入公共片段<!--抽取公共列表--><!--模板名:会使用thymeleaf的前后缀配置规则进行解析--><div th:insert="~{dashb...原创 2020-03-25 21:40:43 · 137 阅读 · 0 评论 -
spring boot之登录&&拦截器
登录开发期间模板引擎页面修改以后,要实时生效1)禁用模板缓存2)idea中页面修改以后按住ctrl+f9:重新编译登录错误消息的显示<!--th:if进行判断,如果msg为空,p标签不生效,th:if的优先级比text高--><p style="color: red" th:text="${msg}" th:if="not ${#strings.isEmpty(msg...原创 2020-03-24 20:28:39 · 127 阅读 · 0 评论 -
spring boot之国际化管理使用
//MessageSourceAutoConfiguration类的配置//springboot默认国际化配置文件:classpath:message.properties@Bean@ConfigurationProperties(prefix = "spring.messages")//前缀名public MessageSourceProperties messageSourcePro...原创 2020-03-24 18:49:47 · 96 阅读 · 0 评论 -
springboot之springmvc的扩展功能
//参照spring boot官方文档,编写自己的config类实现WebMvcConfigurerIf you want to keep Spring Boot MVC features, and you just want to add additional MVC configuration (interceptors, formatters, view controllers etc.)...原创 2020-03-23 19:48:04 · 212 阅读 · 0 评论 -
springboot学习之thymeleaf
//将HTML页面放到classpath:/templates/下面面,thymeleaf即可渲染页面@ConfigurationProperties( prefix = "spring.thymeleaf")public class ThymeleafProperties { private static final Charset DEFAULT_ENCODING; ...原创 2020-03-23 17:35:27 · 69 阅读 · 0 评论 -
spring boot学习之web开发
1)创建项目,选择需要的模块2)spring boot默认将需要的场景配置好了,只需要自己进行少量配置3)编写业务代码自动配置原理:我们使用的场景spring boot帮我们做了什么?能不能修改?能改那些配置?能不能扩展xxxxAutoConfiguration:帮我们给容器中自动配置组件,里面是一些写好的bean组件xxxxProperties:配置类来封装配置文件的内容,相当于之前...原创 2020-03-21 18:41:58 · 99 阅读 · 0 评论 -
spring boot注解之@PropertySource和@ImportResource
@PropertySource:加载指定的配置文件@PropertySource(value = "classpath:person.properties")@Component@ConfigurationProperties(prefix = "person")public class Person {@ImportResource:导入Spring的配置文件,让配置文件中的内容生效;...原创 2020-03-20 18:23:31 · 92 阅读 · 0 评论 -
spring boot学习之@ConfigurationProperties与@Value的区别
1)@ConfigurationProperties支持批量注入@ConfigurationProperties(prefix = “person”)@ConfigurationProperties(prefix = "person")public class Person {@Value只能一个一个进行配置``bash@Value( “${person.name}”)private...原创 2020-03-20 16:51:37 · 85 阅读 · 0 评论 -
spring boot学习之yaml配置
语法:K:(空格)V左边空格一样的属于同一层级使用:/**将配置文件中配置的每一个属性的值映射到这个组件@ConfigurationProperties 告诉spring boot将本类中的所有属性和配置文件中相关的配置进行绑定 prefix = "person":配置文件中哪一个属性进行一一映射只有组件是容器中的组件,才能使用容器提供的功能*/@Component...原创 2020-03-20 16:16:07 · 102 阅读 · 0 评论 -
Javaweb前后端分离思想
转自:https://www.cnblogs.com/gxz-sw/p/9754975.html转载 2020-03-06 20:06:10 · 97 阅读 · 0 评论 -
接口测试+restful
https://www.cnblogs.com/feng0815/p/7509541.htmlhttps://blog.csdn.net/kebi007/article/details/102927209https://www.jianshu.com/p/ee92c9accedd原创 2020-03-05 16:35:12 · 63 阅读 · 0 评论 -
HTTP的请求类型
https://www.cnblogs.com/guanpingping/p/10531718.html转载 2020-03-05 15:20:55 · 92 阅读 · 0 评论 -
maven项目中实现HTTPsession方法
第一种:pom.xml中导包javax.servletservlet-api2.5providedjavax.servletjsp-api2.0providedcontroller方法中定义HTTPsession,然后使用setAttribute和getAttribute进行存值和取值jsp页面可通过${sessionScope}取出的值为{键=值}附:el表达式用...原创 2020-03-04 22:29:19 · 1644 阅读 · 0 评论 -
equals与==的区别
equals比较的是两个对象的值==比较的是两个对象的地址转自:https://blog.csdn.net/qq_36522306/article/details/80550210原创 2020-03-03 20:28:17 · 59 阅读 · 0 评论 -
ssm学习之参数绑定问题
controller方法中的参数值与前端form表单中name的值一致原创 2020-03-03 20:17:08 · 90 阅读 · 0 评论 -
ssm学习之数据库乱码问题
项目前端,后端,数据库,保持编码一致前端:设置编码集charset=“utf-8”后端:web.xml中配置CharacterEncodingFilterorg.springframework.web.filter.CharacterEncodingFilterencodingutf-8forceEncodingtrueCharacterEncodingFilter...原创 2020-03-03 20:10:51 · 85 阅读 · 0 评论 -
jsp与html
定义上HTML页面是静态页面可以直接运行,JSP页面是动态页它运行时需要转换成servletHTML能直接打开,jsp只能发布到Tomact等服务器上才能打开html是w3c规范的一种网页书写格式,是一种统一协议语言,静态网页。我们上网看的网页都是大部分都是基于html语言的。jsp是一种基于动态语言,jsp可以实现html的所有任务。HTML(Hypertext Markup Langua...转载 2020-03-01 20:23:34 · 113 阅读 · 0 评论 -
ssm框架学习之mybatis
关于resultType和resultMap的区别restulyType:1.对应的是java对象中的属性,大小写不敏感,2.如果放的是java.lang.Map,key是查询语句的列名,value是查询的值,大小写敏感3.resultMap:指的是定义好了的id的,是定义好的resyltType的引用注意:用resultType的时候,要保证结果集的列名与java对象的属性相同,而re...原创 2020-03-01 18:21:06 · 124 阅读 · 0 评论 -
后台date类型转换为json字符串时,返回前台页面的是long time值问题解决
在pom文件中导包<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.8</version>...原创 2019-12-05 21:56:20 · 161 阅读 · 0 评论 -
ssm之学习总结
每日学习总结有关ssm的学习回顾问题:忘记加注解,无法扫描对应层,报错信息nosuchbean频繁启动Tomcat会出现端口占用的情况原创 2019-12-01 23:43:04 · 788 阅读 · 0 评论