
SpringBoot
舍予大可
这个作者很懒,什么都没留下…
展开
-
折叠(隐藏)页面1
效果图:展开前:2,展开后:1,使用了 collapse<div class="menu"> <span class="glyphicon glyphicon-thumbs-up icon"></span> <span class="glyphicon glyphicon-comment icon" th:data-id="${原创 2020-05-21 17:56:53 · 343 阅读 · 0 评论 -
配置springboot跳转html页面
1.首先在pom导入依赖,<!--访问资源路径--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>2.在application.prop翻译 2020-05-13 20:38:48 · 277 阅读 · 0 评论 -
访问数据库数据(阅读数)+处理逆向工程重写覆盖问题(会把修改的覆盖掉!)
1,访问数据库数据,多个线程访问数据库数据,有可能导致同步修改数据1.1增加一个方法:questionService.incView(id);package xgl.controller;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Controller;import org.springframework.ui.Model;import o原创 2020-05-09 17:40:52 · 313 阅读 · 0 评论 -
springboot使用AdviceController和ErrorController处理异常和错误
目录结构:1,定义一个处理异常和错误的界面<!DOCTYPE HTML><html xmlns:th="http://www.thymeleaf.org"><head> <title>问答社区</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" hr原创 2020-05-09 16:27:32 · 1627 阅读 · 0 评论 -
SpringBoot使用Mybatis-Generator自动生成代码
目录结构:一,依赖注入: <!--自动生成代码--> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</...原创 2020-05-06 11:14:13 · 188 阅读 · 0 评论 -
IDEA使用H2数据库
1,在pom中导入依赖<!--H2数据库--> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>RELEA...原创 2020-04-18 11:31:11 · 6202 阅读 · 0 评论 -
SpringBoot集成MyBatis
官方文档操作步骤1,导入依赖<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>2.1.1</version&...原创 2020-04-18 11:09:34 · 115 阅读 · 0 评论