springboot 常见的启动器
<!--pringBoot提供了一个名为spring-boot-starter-parent的工程,
里面已经对各种常用依赖(并非全部)的版本进行了管理
我们的项目需要以这个项目为父工程,这样我们就不用操心依赖的版本问题了-->
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
</parent>
<!-- web启动器 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--mybatis -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
# mybatis 别名扫描
mybatis.type-aliases-package=com.heima.pojo
# mapper.xml文件位置,如果没有映射文件,请注释掉
mybatis.mapper-locations=classpath:mappers/*.xml
<!-- 通用mapper -->
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId>
<version>2.0.2</version>
</dependency> @Mapper
public interface UserMapper extends tk.mybatis.mapper.common.Mapper<User>{
}
<!-- themeleaf 模板-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
#Thymeleaf会在第一次对模板解析之后进行缓存,极大的提高了并发处理能力
# 开发阶段关闭thymeleaf的模板缓存
spring.thymeleaf.cache=false
springboot 常见的启动器的更多相关文章
- 【SpringBoot】01.创建Springboot项目及启动器
创建Springboot项目及启动器 1.创建一个简单maven项目 SpringBoot2.0以下需要使用JDK1.7 ,2.0以上使用JDK1.8 如果需要修改JDK的版本需要打开pom文件: & ...
- SpringBoot 定制 starter 启动器
个人博客网:https://wushaopei.github.io/ (你想要这里多有) 在实际项目开发中,我们常常会用到各种各样的 starter,这些starter 有的是有 springb ...
- SpringBoot常见注解
0.前言 这篇文章介绍的 Spring/SpringBoot 常用注解基本已经涵盖你工作中遇到的大部分常用的场景.对于每一个注解我都说了具体用法,掌握搞懂,使用 SpringBoot 来开发项目基本没 ...
- 【springboot】自定义启动器
本文只对springboot自定义启动器的具体实现进行描述,不涉及springboot自动装配原理的介绍. 对springboot自动配置原理感兴趣的请移步 狂神说SpringBoot02:运行原理初 ...
- springboot常见应用属性
# ===================================================================# COMMON SPRING BOOT PROPERTIES ...
- springboot常见写法
访问html文件 对于aa.html页面,采用跳转到方式:放在templates目录下时,要加一个thymeleaf依赖,并在controller跳转. 不用跳转到方式: 将依赖去掉,将control ...
- 170710、springboot编程之启动器Starter详解
此文系参考网络大牛的,如有侵权,请见谅! Spring Boot应用启动器基本的一共有N(现知道的是44)种:具体如下: 1)spring-boot-starter 这是Spring Boot的核心启 ...
- springboot常见注解 2020-01-19
1,@SpringBootApplication 是springboot的核心注解,用在启动类上,是由 @Configuration 加载spring,配置spring并启动spring容器; 启动容 ...
- SpringBoot常见的异常问题
1. org.mybatis.logging.LoggerFactory Springboot启动报错 Caused by: java.lang.ClassNotFoundException: org ...
随机推荐
- istio 简介
最近接触到了 istio,感觉十分强大,写篇短文推荐给大家.本文所涉及的具体实验步骤可以参考官网教程. istio 相关文章列表: istio 简介 istio 性能测试 istio 是什么 Isti ...
- django 使用PyMySQL连接mysql
* 安装pymysql模块 pip install pymysql * settings.py添加下面设置 ## pymysql repalce mysqldb import pymysql pymy ...
- Spring cloud微服务安全实战-3-11API安全机制之登录
流控.认证.审计.授权以上都做了初步的简单的实现. 之前写的代码,base64加密了用户名和密码. 缺点1:每次请求都要带用户名密码 增加了泄露的风险. 每次传上来用户名和密码都要check验证.ch ...
- c# 子线程与主线程通信二
之前写过使用线程上下文实现线程同步,今天利用子线程向主线程发送事件,实现子线程与主线程的同步 基本步骤 1.定义类 using System; using System.Collections.Gen ...
- ubuntu 18.04使用sysbench测试MySQL性能
首先下载安装sysbench: sudo apt-get install sysbench -y 查看一下sysbench版本是多少: zifeiy@zifeiy-S1-Series:~$ sysbe ...
- jQuery调用WebService返回JSON数据
相信大家都比较了解JSON格式的数据对于ajax的方便,不了解的可以从网上找一下这方面的资料来看一下,这里就不多说了,不清楚的可以在网上查一下,这里只说一下因为参数设置不当引起的取不到返回值的问题. ...
- CentOS7使用yum安装RabbitMQ
转自:https://jingyan.baidu.com/article/456c463b16f3820a583144a1.html 登录名:admin 密码:admin 1. 如果安装后web界 ...
- Visual Studio 2019 社区版本离线安装
官方指导 :https://docs.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual ...
- RabbitMQ官方教程二 Work Queues(GOLANG语言实现)
RabbitMQ官方教程二 Work Queues(GOLANG语言实现) 在第一个教程中,我们编写了程序来发送和接收来自命名队列的消息. 在这一部分中,我们将创建一个工作队列,该队列将用于在多个wo ...
- Machine Learning Glossary
http://people.seas.harvard.edu/~mgelbart/glossary.html more at:http://www.metacademy.org/list