javaspringspring-bootspring-securityspring-tool-suite

How to install spring-boot-starter-security dependency


I am reading a tutorial on "Building Microservices with Spring", however, I can't find "spring-boot-starter-security" dependency - I am using Spring Tool Suite 3.8.3

Any guidance on how to install this dependency will be highly appreciated.

PS: I am new to Java and SpringFramework

Maven dependency management picture


Solution

  • You need to find your pom.xml, this is the file where all your dependencies are managed.

    You can find a file in the Spring Tool Suite, by going to the search menu and d selecting file. You simply then need to enter "pom.xml" in the "File name patterns (seperated by comma):" field and press search.

    You then can add the dependency like this in the <dependencies></dependencies> element of the xml file.

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
        <version>1.4.0.M3</version>
    </dependency>