【发布时间】:2017-07-24 23:32:37
【问题描述】:
我正在阅读有关“使用 Spring 构建微服务”的教程,但是,我找不到“spring-boot-starter-security”依赖项 - 我使用的是 Spring Tool Suite 3.8.3
非常感谢任何有关如何安装此依赖项的指导。
PS:我是 Java 和 SpringFramework 的新手
【问题讨论】:
标签: java spring spring-boot spring-tool-suite
我正在阅读有关“使用 Spring 构建微服务”的教程,但是,我找不到“spring-boot-starter-security”依赖项 - 我使用的是 Spring Tool Suite 3.8.3
非常感谢任何有关如何安装此依赖项的指导。
PS:我是 Java 和 SpringFramework 的新手
【问题讨论】:
标签: java spring spring-boot spring-tool-suite
您也可以右键单击 pom.xml 文件并转到“Spring -> Edit Starters”并在那里选择一个用于 Spring Security。它会为你的 pom 添加 spring boot starter 依赖项。
【讨论】:
您需要找到您的 pom.xml,这是管理所有依赖项的文件。
您可以在 Spring Tool Suite 中找到一个文件,方法是转到搜索菜单并选择文件。然后,您只需在“文件名模式(以逗号分隔):”字段中输入“pom.xml”,然后按搜索。
然后您可以在 xml 文件的 <dependencies> </dependencies> 元素中添加这样的依赖项。
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>1.4.0.M3</version>
</dependency>
【讨论】: