
Spring Boot
文章平均质量分 50
追光少年.
这个作者很懒,什么都没留下…
展开
-
Thymeleaf 标准表达式语法详解
下面这篇文章总结的很好:Thymeleaf 标准表达式语法详解https://blog.youkuaiyun.com/const_/article/details/97385319?spm=1001.2101.3001.6650.3&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-3.pc_relevant_antiscanv2&depth_1-utm_source=distribute.p.原创 2022-04-16 18:03:09 · 177 阅读 · 0 评论 -
关于thymeleaf模板引擎中th:if的使用
下面这篇文章总结的很好,请前往参考学习:关于thymeleaf模板引擎中th:if的使用https://blog.youkuaiyun.com/weixin_38192427/article/details/108061869原创 2022-04-16 17:54:17 · 480 阅读 · 0 评论 -
使用thymeleaf进行路径传递参数
在进行开发时,我们经常会用到需要将参数附加到访问路径上,不能直接使用传统的 "?a=1"的形式,而是应该采用下面字符串拼接的方式:<a href="/author/published_chapters" th:href="'/author/published_chapters?bookId=' + ${book.getBookId()}" class="btn btn-primary" role="button">章节管理</a>...原创 2022-04-16 16:46:35 · 1704 阅读 · 1 评论 -
EL1007E: Property or field ‘username‘ cannot be found on null
出现如下报错:2022-04-13 22:14:24.738 ERROR 20160 --- [nio-8081-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thy原创 2022-04-13 22:19:52 · 2958 阅读 · 1 评论 -
manul_css.css:1 Failed to load resource: the server responded with a status of 404 ()
在启动springboot加载首页时,出现如下截图的报错:出现这种报错,是因为静态资源的引入路径不正确,不能写成下面的路径:<link rel="stylesheet" type="text/css" href="../static/css/bootstrap.min.css">而应该写成: <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">这是因为springboot对原创 2022-04-13 10:58:20 · 668 阅读 · 1 评论 -
Consider defining a bean of type ‘com.luyao.guyue_demo.dao.UserDAO‘ in your configuration.
出现如下报错的原因是,没有在方法入口GuyueDemoApplication添加@MapperScan(开启包扫描)注解,添加该注解即可。原创 2022-04-12 19:23:55 · 308 阅读 · 0 评论 -
SpringBoot 指标监控
1. 简介未来每一个微服务在云上部署以后,我们都需要对其进行监控、追踪、审计、控制等。SpringBoot就抽取了Actuator场景,使得我们每个微服务快速引用即可获得生产级别的应用监控、审计等功能。2. 使用2.1 引入场景依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuat原创 2022-03-15 16:11:39 · 186 阅读 · 0 评论 -
Spring Boot 单元测试
1.单元测试1.引入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency>2.使用@S原创 2022-03-15 10:43:03 · 314 阅读 · 0 评论 -
SpringBoot整合mybatis
##1. 整合mybatismybatis官网:https://github.com/mybatis原创 2022-03-14 19:07:27 · 950 阅读 · 0 评论