Radhe Rajput
I have run into same problem, found that this tutorial only works with Spring Boot 1.5.X.
Step 1 ask you to download demo.zip from https://start.spring.io/, which genrerates the latest and great Spring Boot POM.xml, which is problem.
Just for reference I’m here posting Spring Boot 1.5.9 pom.xml, it may be helpful to others, and need not to spent too much of time googling and debugging the issue.
Just replace the downloaded pom.xml with below. The tutorial will work with charm.
<project xsi:schemalocation=“http://maven.apache.org/POM… http://maven.apache.org/xsd…” xmlns:xsi=“http://www.w3.org/2001/XMLS…” xmlns=“http://maven.apache.org/POM…”>
<modelversion>4.0.0</modelversion>
<groupid>com.example</groupid>
<artifactid>demo</artifactid>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-parent</artifactid>
<version>1.5.9.RELEASE</version>
<relativepath/>
</parent>
<properties>
<project.build.sourceencoding>UTF-8</project.build.sourceencoding>
<project.reporting.outputencoding>UTF-8</project.reporting.outputencoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-security</artifactid>
</dependency>
<dependency>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-web</artifactid>
</dependency>
<dependency>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-test</artifactid>
<scope>test</scope>
</dependency>
<dependency>
<groupid>org.springframework.security</groupid>
<artifactid>spring-security-test</artifactid>
<scope>test</scope>
</dependency>
<dependency>
<groupid>com.okta.spring</groupid>
<artifactid>okta-spring-boot-starter</artifactid>
<version>0.2.0</version>
</dependency>
<dependency>
<groupid>org.springframework.security.oauth</groupid>
<artifactid>spring-security-oauth2</artifactid>
<version>2.2.0.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-maven-plugin</artifactid>
</plugin>
</plugins>
</build>
</project>