Since spring-security-oauth2-autoconfigure
is externalized you will need to ensure to add it to your classpath.
You can get the source and log issues on GitHub.
A minimal Maven set of dependencies typically looks like the following:
pom.xml.
<dependencies> <!-- ... other dependency elements ... --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.security.oauth.boot</groupId> <artifactId>spring-security-oauth2-autoconfigure</artifactId> <version>2.1.0.RELEASE</version> </dependency> </dependencies>
All GA releases (i.e. versions ending in .RELEASE) are deployed to Maven Central, so no additional Maven repositories need to be declared in your pom.
If you are using a SNAPSHOT version, you will need to ensure you have the Spring Snapshot repository defined as shown below:
pom.xml.
<repositories> <!-- ... possibly other repository elements ... --> <repository> <id>spring-snapshot</id> <name>Spring Snapshot Repository</name> <url>http://repo.spring.io/snapshot</url> </repository> </repositories>
If you are using a milestone or release candidate version, you will need to ensure you have the Spring Milestone repository defined as shown below:
pom.xml.
<repositories> <!-- ... possibly other repository elements ... --> <repository> <id>spring-milestone</id> <name>Spring Milestone Repository</name> <url>http://repo.spring.io/milestone</url> </repository> </repositories>
A minimal Spring Security Gradle set of dependencies typically looks like the following:
build.gradle.
dependencies { compile 'org.springframework.boot:spring-boot-starter-security' compile 'org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.1.0.RELEASE' }
All GA releases (i.e. versions ending in .RELEASE) are deployed to Maven Central, so using the mavenCentral() repository is sufficient for GA releases.
build.gradle.
repositories { mavenCentral() }
If you are using a SNAPSHOT version, you will need to ensure you have the Spring Snapshot repository defined as shown below:
build.gradle.
repositories {
maven { url 'https://repo.spring.io/snapshot' }
}
If you are using a milestone or release candidate version, you will need to ensure you have the Spring Milestone repository defined as shown below:
build.gradle.
repositories {
maven { url 'https://repo.spring.io/milestone' }
}