浏览代码

Add messaging to documentation about sample migration

Closes gh-9815
Marcus Hert da Coregio 4 年之前
父节点
当前提交
d60981fd59

+ 5 - 1
docs/guides/spring-security-docs-guides.gradle

@@ -5,6 +5,8 @@ asciidoctor {
 	baseDir = file('src/docs/asciidoc')
 	options eruby: 'erubis'
 
+	def ghTag = snapshotBuild ? 'main' : project.version
+	def ghSamplesUrl = "https://github.com/spring-projects/spring-security-samples/tree/$ghTag"
 	attributes copycss : '',
 			icons : 'font',
 			'source-highlighter': 'prettify',
@@ -17,7 +19,9 @@ asciidoctor {
 			'spring-security-version' : project.version,
 			'download-url' : getDownloadUrl(),
 			'include-maven-repository' : getMavenRepositoryInclude(),
-			revnumber : project.version
+			revnumber : project.version,
+			'gh-samples-url': ghSamplesUrl,
+			'gh-old-samples-url': "https://github.com/spring-projects/spring-security/tree/5.4.x/samples"
 }
 
 ext.spec = copySpec {

+ 6 - 1
docs/guides/src/docs/asciidoc/_includes/setting-up-the-sample-boot.asc

@@ -16,7 +16,12 @@ This section outlines how to setup a workspace within https://spring.io/tools/st
 
 === Obtaining the sample project
 
-Extract the {download-url}[Spring Security Distribution] to a known location and remember it as _SPRING_SECURITY_HOME_.
+Clone the {gh-samples-url}[Spring Security Samples project] to a known location and remember it as _SPRING_SECURITY_HOME_.
+[NOTE]
+====
+These samples are being migrated to a separate project, however, you can still find
+the not migrated samples in an older branch of the {gh-old-samples-url}[Spring Security repository].
+====
 
 === Import the {starter-appname} sample application
 

+ 6 - 1
docs/guides/src/docs/asciidoc/_includes/setting-up-the-sample.asc

@@ -16,7 +16,12 @@ This section outlines how to setup a workspace within https://spring.io/tools/st
 
 === Obtaining the sample project
 
-Extract the {download-url}[Spring Security Distribution] to a known location and remember it as _SPRING_SECURITY_HOME_.
+Clone the {gh-samples-url}[Spring Security Samples project] to a known location and remember it as _SPRING_SECURITY_HOME_.
+[NOTE]
+====
+These samples are being migrated to a separate project, however, you can still find
+the not migrated samples in an older branch of the {gh-old-samples-url}[Spring Security repository].
+====
 
 === Import the {starter-appname} sample application
 

+ 4 - 1
docs/manual/spring-security-docs-manual.gradle

@@ -16,11 +16,14 @@ asciidoctor {
 asciidoctorj {
 	def ghTag = snapshotBuild ? 'main' : project.version
 	def ghUrl = "https://github.com/spring-projects/spring-security/tree/$ghTag"
+	def ghOldSamplesUrl = "https://github.com/spring-projects/spring-security/tree/5.4.x/samples"
+	def ghSamplesUrl = "https://github.com/spring-projects/spring-security-samples/tree/$ghTag"
 	attributes 'spring-security-version' : project.version,
 		'spring-boot-version' : springBootVersion,
 		revnumber : project.version,
 		'gh-url': ghUrl,
-		'gh-samples-url': "$ghUrl/samples"
+		'gh-samples-url': ghSamplesUrl,
+		'gh-old-samples-url': ghOldSamplesUrl
 	attributeProvider resolvedVersions(project.configurations.testRuntimeClasspath)
 }
 

+ 6 - 0
docs/manual/src/docs/asciidoc/_includes/about/samples.adoc

@@ -2,3 +2,9 @@
 = Samples
 
 Spring Security includes many {gh-samples-url}[samples] applications.
+
+[NOTE]
+====
+These samples are being migrated to a separate project, however, you can still find
+the not migrated samples in an older branch of the {gh-old-samples-url}[Spring Security repository].
+====