springboot集合springsecurity的依赖
时间: 2023-09-12 16:07:03 浏览: 96
在使用Spring Boot集成Spring Security时,需要在pom.xml文件中添加以下依赖:
```
<dependencies>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- Spring Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Thymeleaf -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- Spring Security Test -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
```
其中,spring-boot-starter-security是Spring Security的起步依赖,spring-boot-starter-web是Spring Web的起步依赖,spring-boot-starter-thymeleaf是Thymeleaf的起步依赖,spring-security-test是Spring Security的测试依赖。
阅读全文