
SpringBoot
文章平均质量分 69
北方有梦_hsp
这个作者很懒,什么都没留下…
展开
-
spring-cloud-搭建Eureka出现内置tomcat无法启动的问题解决方案
问题描述在学Eureka时,随便写了一个demo,出现了些问题,给启动类添加@EnableEurekaServer注解后会报以下的错误(不加没事),翻阅资料发现说是SpringBoot版本和Eureka不匹配,但是没有找到解决方案.java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present at java.base/sun.reflect.generics.factory.CoreReflectionFa原创 2021-01-03 04:04:44 · 1716 阅读 · 3 评论 -
SpringBoot-pagehelper
1.添加启动器<dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.3</version></dependency>2.java代码 PageHelper.startPage(1, 3);原创 2020-12-28 14:23:11 · 141 阅读 · 0 评论 -
SpringBoot-Mybatis-Plus配置
Mybatis-Plus配置1.设置pom文件<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http:/原创 2020-12-27 18:40:50 · 199 阅读 · 0 评论 -
Thymeleaf详解
Thymeleaf详解表达式分为三种变量表达式选择或星号表达式URL表达式1.变量表达式${user.name}2.选择(星号)表达式使用th:object="${user}">定义下发要用到的对象,可以简化变量表达式<tr th:each="user : ${all}" th:object="${user}"> <td th:text="${user.id}">1</td> <td th:text="*{name}原创 2020-12-27 16:08:25 · 405 阅读 · 0 评论 -
Thymeleaf(替代JSP)
Thymeleaf1.简介Thymeleaf 是一个跟 FreeMarker 类似的模板引擎,它可以完全替代 JSP 。相较与其他的模板引擎,它有如下特点:动静结合:Thymeleaf 在有网络和无网络的环境下皆可运行,无网络显示静态内容,有网络用后台得到数据替换静态内容与SpringBoot完美整合,springboot默认整合thymeleaf2.编写接口2.1 service层@Servicepublic class UserService { //在通用mapp原创 2020-12-27 13:10:50 · 2713 阅读 · 0 评论 -
SpringBoot使用-整合通用mapper
SpringBoot使用通用mapper1.引入依赖<dependency> <groupId>tk.mybatis</groupId> <artifactId>mapper-spring-boot-starter</artifactId> <version>2.0.2</version></dependency>2.写bean类//表名和类名一致可以省略@Table(na原创 2020-12-26 21:24:16 · 357 阅读 · 0 评论 -
SpringBoot
SpringBoot使用1.引入标签约定版本<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.0.RELEASE</version></parent>2.引入依赖(想要开发web场景)<d原创 2020-12-25 19:57:47 · 158 阅读 · 0 评论