-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue gh-2567 Co-authored-by: Jay Bryant <[email protected]> Co-authored-by: Rob Winch <[email protected]>
- Loading branch information
1 parent
f832d08
commit 25b5f48
Showing
12 changed files
with
509 additions
and
585 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
docs/manual/src/docs/asciidoc/_includes/about/community.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[[community]] | ||
= Spring Security Community | ||
|
||
Welcome to the Spring Security Community! | ||
This section discusses how you can make the most of our vast community. | ||
|
||
|
||
[[community-help]] | ||
== Getting Help | ||
If you need help with Spring Security, we are here to help. | ||
The following are some of the best ways to get help: | ||
|
||
* Read through this documentation. | ||
* Try one of our many <<samples,sample applications>>. | ||
* Ask a question on https://stackoverflow.com/questions/tagged/spring-security[https://stackoverflow.com] with the `spring-security` tag. | ||
* Report bugs and enhancement requests at https://github.com/spring-projects/spring-security/issues | ||
|
||
[[community-becoming-involved]] | ||
== Becoming Involved | ||
We welcome your involvement in the Spring Security project. | ||
There are many ways to contribute, including answering questions on StackOverflow, writing new code, improving existing code, assisting with documentation, developing samples or tutorials, reporting bugs, or simply making suggestions. | ||
For more information, see our https://github.com/spring-projects/spring-security/blob/master/CONTRIBUTING.md[Contributing] documentation. | ||
|
||
[[community-source]] | ||
== Source Code | ||
|
||
You can find Spring Security's source code on GitHub at https://github.com/spring-projects/spring-security/ | ||
|
||
[[community-license]] | ||
== Apache 2 License | ||
|
||
Spring Security is Open Source software released under the https://www.apache.org/licenses/LICENSE-2.0.html[Apache 2.0 license]. | ||
|
||
== Social Media | ||
|
||
You can follow https://twitter.com/SpringSecurity[@SpringSecurity] and the https://twitter.com/SpringSecurity/lists/team[Spring Security team] on Twitter to stay up to date with the latest news. | ||
You can also follow https://twitter.com/SpringCentral[@SpringCentral] to keep up to date with the entire Spring portfolio. |
344 changes: 344 additions & 0 deletions
344
docs/manual/src/docs/asciidoc/_includes/about/getting-spring-security.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,344 @@ | ||
[[getting]] | ||
= Getting Spring Security | ||
|
||
This section discusses all you need to know about getting the Spring Security binaries. | ||
See <<community-source>> for how to obtain the source code. | ||
|
||
== Release Numbering | ||
|
||
Spring Security versions are formatted as MAJOR.MINOR.PATCH such that: | ||
|
||
* MAJOR versions may contain breaking changes. | ||
Typically, these are done to provide improved security to match modern security practices. | ||
* MINOR versions contain enhancements but are considered passive updates | ||
* PATCH level should be perfectly compatible, forwards and backwards, with the possible exception of changes that fix bugs. | ||
|
||
|
||
[[maven]] | ||
== Usage with Maven | ||
|
||
As most open source projects, Spring Security deploys its dependencies as Maven artifacts. | ||
The topics in this section provide detail on how to consume Spring Security when using Maven. | ||
|
||
[[getting-maven-boot]] | ||
=== Spring Boot with Maven | ||
|
||
Spring Boot provides a `spring-boot-starter-security` starter that aggregates Spring Security-related dependencies together. | ||
The simplest and preferred way to use the starter is to use https://docs.spring.io/initializr/docs/current/reference/htmlsingle/[Spring Initializr] by using an IDE integration (http://joshlong.com/jl/blogPost/tech_tip_geting_started_with_spring_boot.html[Eclipse], https://www.jetbrains.com/help/idea/spring-boot.html#d1489567e2[IntelliJ], https://github.com/AlexFalappa/nb-springboot/wiki/Quick-Tour[NetBeans]) or through https://start.spring.io. | ||
|
||
Alternatively, you can manually add the starter, as the following example shows: | ||
|
||
|
||
.pom.xml | ||
==== | ||
[source,xml] | ||
[subs="verbatim,attributes"] | ||
---- | ||
<dependencies> | ||
<!-- ... other dependency elements ... --> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-security</artifactId> | ||
</dependency> | ||
</dependencies> | ||
---- | ||
==== | ||
|
||
Since Spring Boot provides a Maven BOM to manage dependency versions, you do not need to specify a version. | ||
If you wish to override the Spring Security version, you may do so by providing a Maven property, as the following example shows: | ||
|
||
.pom.xml | ||
==== | ||
[source,xml] | ||
[subs="verbatim,attributes"] | ||
---- | ||
<properties> | ||
<!-- ... --> | ||
<spring-security.version>{spring-security-version}</spring-security.version> | ||
</dependencies> | ||
---- | ||
==== | ||
|
||
Since Spring Security makes breaking changes only in major releases, it is safe to use a newer version of Spring Security with Spring Boot. | ||
However, at times, you may need to update the version of Spring Framework as well. | ||
You can do so by adding a Maven property, as the following example shows: | ||
|
||
.pom.xml | ||
==== | ||
[source,xml] | ||
[subs="verbatim,attributes"] | ||
---- | ||
<properties> | ||
<!-- ... --> | ||
<spring.version>{spring-version}</spring.version> | ||
</dependencies> | ||
---- | ||
==== | ||
|
||
If you use additional features (such as LDAP, OpenID, and others), you need to also include the appropriate <<modules>>. | ||
|
||
=== Maven Without Spring Boot | ||
|
||
When you use Spring Security without Spring Boot, the preferred way is to use Spring Security's BOM to ensure a consistent version of Spring Security is used throughout the entire project. The following example shows how to do so: | ||
|
||
.pom.xml | ||
==== | ||
[source,xml] | ||
[subs="verbatim,attributes"] | ||
---- | ||
<dependencyManagement> | ||
<dependencies> | ||
<!-- ... other dependency elements ... --> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-bom</artifactId> | ||
<version>{spring-security-version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
---- | ||
==== | ||
|
||
A minimal Spring Security Maven set of dependencies typically looks like the following: | ||
|
||
.pom.xml | ||
==== | ||
[source,xml] | ||
[subs="verbatim,attributes"] | ||
---- | ||
<dependencies> | ||
<!-- ... other dependency elements ... --> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
<artifactId>spring-security-config</artifactId> | ||
</dependency> | ||
</dependencies> | ||
---- | ||
==== | ||
|
||
If you use additional features (such as LDAP, OpenID, and others), you need to also include the appropriate <<modules>>. | ||
|
||
Spring Security builds against Spring Framework {spring-version} but should generally work with any newer version of Spring Framework 5.x. | ||
Many users are likely to run afoul of the fact that Spring Security's transitive dependencies resolve Spring Framework {spring-version}, which can cause strange classpath problems. | ||
The easiest way to resolve this is to use the `spring-framework-bom` within the `<dependencyManagement>` section of your `pom.xml` as the following example shows: | ||
|
||
.pom.xml | ||
==== | ||
[source,xml] | ||
[subs="verbatim,attributes"] | ||
---- | ||
<dependencyManagement> | ||
<dependencies> | ||
<!-- ... other dependency elements ... --> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-framework-bom</artifactId> | ||
<version>{spring-version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
---- | ||
==== | ||
|
||
The preceding example ensures that all the transitive dependencies of Spring Security use the Spring {spring-version} modules. | ||
|
||
NOTE: This approach uses Maven's "`bill of materials`" (BOM) concept and is only available in Maven 2.0.9+. | ||
For additional details about how dependencies are resolved, see http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html[Maven's Introduction to the Dependency Mechanism documentation]. | ||
|
||
[[maven-repositories]] | ||
=== Maven Repositories | ||
All GA releases (that is, versions ending in .RELEASE) are deployed to Maven Central, so no additional Maven repositories need to be declared in your pom. | ||
|
||
If you use a SNAPSHOT version, you need to ensure that you have the Spring Snapshot repository defined, as the following example shows: | ||
|
||
.pom.xml | ||
==== | ||
[source,xml] | ||
---- | ||
<repositories> | ||
<!-- ... possibly other repository elements ... --> | ||
<repository> | ||
<id>spring-snapshot</id> | ||
<name>Spring Snapshot Repository</name> | ||
<url>https://repo.spring.io/snapshot</url> | ||
</repository> | ||
</repositories> | ||
---- | ||
==== | ||
|
||
If you use a milestone or release candidate version, you need to ensure that you have the Spring Milestone repository defined, as the following example shows: | ||
|
||
.pom.xml | ||
==== | ||
[source,xml] | ||
---- | ||
<repositories> | ||
<!-- ... possibly other repository elements ... --> | ||
<repository> | ||
<id>spring-milestone</id> | ||
<name>Spring Milestone Repository</name> | ||
<url>https://repo.spring.io/milestone</url> | ||
</repository> | ||
</repositories> | ||
---- | ||
==== | ||
|
||
[[getting-gradle]] | ||
== Gradle | ||
|
||
As most open source projects, Spring Security deploys its dependencies as Maven artifacts, which allows for for first-class Gradle support. | ||
The following topics provide detail on how to consume Spring Security when using Gradle. | ||
|
||
[[getting-gradle-boot]] | ||
=== Spring Boot with Gradle | ||
|
||
Spring Boot provides a `spring-boot-starter-security` starter that aggregates Spring Security related dependencies together. | ||
The simplest and preferred method to use the starter is to use https://docs.spring.io/initializr/docs/current/reference/htmlsingle/[Spring Initializr] by using an IDE integration (http://joshlong.com/jl/blogPost/tech_tip_geting_started_with_spring_boot.html[Eclipse], https://www.jetbrains.com/help/idea/spring-boot.html#d1489567e2[IntelliJ], https://github.com/AlexFalappa/nb-springboot/wiki/Quick-Tour[NetBeans]) or through https://start.spring.io. | ||
|
||
Alternatively, you can manually add the starter, as the following example shows: | ||
|
||
.build.gradle | ||
==== | ||
[source,groovy] | ||
[subs="verbatim,attributes"] | ||
---- | ||
dependencies { | ||
compile "org.springframework.boot:spring-boot-starter-security" | ||
} | ||
---- | ||
==== | ||
|
||
Since Spring Boot provides a Maven BOM to manage dependency versions, you need not specify a version. | ||
If you wish to override the Spring Security version, you may do so by providing a Gradle property, as the following example shows: | ||
|
||
.build.gradle | ||
==== | ||
[source,groovy] | ||
[subs="verbatim,attributes"] | ||
---- | ||
ext['spring-security.version']='{spring-security-version}' | ||
---- | ||
==== | ||
|
||
Since Spring Security makes breaking changes only in major releases, it is safe to use a newer version of Spring Security with Spring Boot. | ||
However, at times, you may need to update the version of Spring Framework as well. | ||
You can do so by adding a Gradle property, as the following example shows: | ||
|
||
.build.gradle | ||
==== | ||
[source,groovy] | ||
[subs="verbatim,attributes"] | ||
---- | ||
ext['spring.version']='{spring-version}' | ||
---- | ||
==== | ||
|
||
If you use additional features (such as LDAP, OpenID, and others), you need to also include the appropriate <<modules>>. | ||
|
||
=== Gradle Without Spring Boot | ||
|
||
When you use Spring Security without Spring Boot, the preferred way is to use Spring Security's BOM to ensure a consistent version of Spring Security is used throughout the entire project. | ||
You can do so by using the https://github.com/spring-gradle-plugins/dependency-management-plugin[Dependency Management Plugin], as the following example shows: | ||
|
||
.build.gradle | ||
==== | ||
[source,groovy] | ||
[subs="verbatim,attributes"] | ||
---- | ||
plugins { | ||
id "io.spring.dependency-management" version "1.0.6.RELEASE" | ||
} | ||
dependencyManagement { | ||
imports { | ||
mavenBom 'org.springframework.security:spring-security-bom:{spring-security-version}' | ||
} | ||
} | ||
---- | ||
==== | ||
|
||
A minimal Spring Security Maven set of dependencies typically looks like the following: | ||
|
||
.build.gradle | ||
==== | ||
[source,groovy] | ||
[subs="verbatim,attributes"] | ||
---- | ||
dependencies { | ||
compile "org.springframework.security:spring-security-web" | ||
compile "org.springframework.security:spring-security-config" | ||
} | ||
---- | ||
==== | ||
|
||
If you use additional features (such as LDAP, OpenID, and others), you need to also include the appropriate <<modules>>. | ||
|
||
Spring Security builds against Spring Framework {spring-version} but should generally work with any newer version of Spring Framework 5.x. {JB} | ||
Many users are likely to run afoul of the fact that Spring Security's transitive dependencies resolve Spring Framework {spring-version}, which can cause strange classpath problems. | ||
The easiest way to resolve this is to use the `spring-framework-bom` within your `<dependencyManagement>` section of your `pom.xml`. | ||
You can do so by using the https://github.com/spring-gradle-plugins/dependency-management-plugin[Dependency Management Plugin], as the following example shows: | ||
|
||
.build.gradle | ||
==== | ||
[source,groovy] | ||
[subs="verbatim,attributes"] | ||
---- | ||
plugins { | ||
id "io.spring.dependency-management" version "1.0.6.RELEASE" | ||
} | ||
dependencyManagement { | ||
imports { | ||
mavenBom 'org.springframework:spring-framework-bom:{spring-version}' | ||
} | ||
} | ||
---- | ||
==== | ||
|
||
The preceding example ensures that all the transitive dependencies of Spring Security use the Spring {spring-version} modules. | ||
|
||
[[gradle-repositories]] | ||
=== Gradle Repositories | ||
All GA releases (that is, versions ending in .RELEASE) are deployed to Maven Central, so using the mavenCentral() repository is sufficient for GA releases. The following example shows how to do so: | ||
|
||
.build.gradle | ||
==== | ||
[source,groovy] | ||
---- | ||
repositories { | ||
mavenCentral() | ||
} | ||
---- | ||
==== | ||
|
||
If you use a SNAPSHOT version, you need to ensure you have the Spring Snapshot repository defined, as the following example shows: | ||
|
||
.build.gradle | ||
==== | ||
[source,groovy] | ||
---- | ||
repositories { | ||
maven { url 'https://repo.spring.io/snapshot' } | ||
} | ||
---- | ||
==== | ||
|
||
If you use a milestone or release candidate version, you need to ensure that you have the Spring Milestone repository defined, as the following example shows: | ||
|
||
.build.gradle | ||
==== | ||
[source,groovy] | ||
---- | ||
repositories { | ||
maven { url 'https://repo.spring.io/milestone' } | ||
} | ||
---- | ||
==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.