mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-05-03 03:43:54 +01:00
Fix links to source code in reference documentation
Closes gh-47348
This commit is contained in:
+13
-1
@@ -116,6 +116,18 @@ apiref-openjdk=https://docs.oracle.com/en/java/javase/17/docs/api
|
|||||||
# === Code Links ===
|
# === Code Links ===
|
||||||
|
|
||||||
code-spring-boot=https://github.com/{github-repo}/tree/{github-ref}
|
code-spring-boot=https://github.com/{github-repo}/tree/{github-ref}
|
||||||
code-spring-boot-autoconfigure-src={code-spring-boot}/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
|
code-spring-boot-autoconfigure-src={code-spring-boot}/core/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
|
||||||
|
code-spring-boot-batch-jdbc-src={code-spring-boot}/module/spring-boot-batch-jdbc/src/main/java/org/springframework/boot/batch/jdbc
|
||||||
|
code-spring-boot-batch-src={code-spring-boot}/module/spring-boot-batch/src/main/java/org/springframework/boot/batch
|
||||||
|
code-spring-boot-freemarker-src={code-spring-boot}/module/spring-boot-freemarker/src/main/java/org/springframework/boot/freemarker
|
||||||
|
code-spring-boot-groovy-templates-src={code-spring-boot}/module/spring-boot-groovy-templates/src/main/java/org/springframework/boot/groovy/template
|
||||||
|
code-spring-boot-hibernate-src={code-spring-boot}/module/spring-boot-hibernate/src/main/java/org/springframework/boot/hibernate
|
||||||
|
code-spring-boot-integration-src={code-spring-boot}/module/spring-boot-integration/src/main/java/org/springframework/boot/integration
|
||||||
|
code-spring-boot-jdbc-src={code-spring-boot}/module/spring-boot-jdbc/src/main/java/org/springframework/boot/jdbc
|
||||||
|
code-spring-boot-jooq-src={code-spring-boot}/module/spring-boot-jooq/src/main/java/org/springframework/boot/jooq
|
||||||
|
code-spring-boot-jpa-src={code-spring-boot}/module/spring-boot-jpa/src/main/java/org/springframework/boot/jpa
|
||||||
code-spring-boot-latest=https://github.com/{github-repo}/tree/main
|
code-spring-boot-latest=https://github.com/{github-repo}/tree/main
|
||||||
|
code-spring-boot-servlet-src={code-spring-boot}/module/spring-boot-servlet/src/main/java/org/springframework/boot/servlet
|
||||||
|
code-spring-boot-thymeleaf-src={code-spring-boot}/module/spring-boot-thymeleaf/src/main/java/org/springframework/boot/thymeleaf
|
||||||
|
code-spring-boot-webmvc-src={code-spring-boot}/module/spring-boot-webmvc/src/main/java/org/springframework/boot/webmvc
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -104,7 +104,7 @@ This will also provide you with configuration property metadata for the specific
|
|||||||
TIP: Spring Boot will expose Hikari-specific settings to `spring.datasource.hikari`.
|
TIP: Spring Boot will expose Hikari-specific settings to `spring.datasource.hikari`.
|
||||||
This example uses a more generic `configuration` sub namespace as the example does not support multiple datasource implementations.
|
This example uses a more generic `configuration` sub namespace as the example does not support multiple datasource implementations.
|
||||||
|
|
||||||
See xref:reference:data/sql.adoc#data.sql.datasource[] and the {code-spring-boot-autoconfigure-src}/jdbc/DataSourceAutoConfiguration.java[`DataSourceAutoConfiguration`] class for more details.
|
See xref:reference:data/sql.adoc#data.sql.datasource[] and the {code-spring-boot-jdbc-src}/autoconfigure/DataSourceAutoConfiguration.java[`DataSourceAutoConfiguration`] class for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ Alternatively, you can configure the following bean:
|
|||||||
|
|
||||||
include-code::standard/MyHibernateConfiguration[]
|
include-code::standard/MyHibernateConfiguration[]
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/orm/jpa/HibernateJpaAutoConfiguration.java[`HibernateJpaAutoConfiguration`] and {code-spring-boot-autoconfigure-src}/orm/jpa/JpaBaseConfiguration.java[`JpaBaseConfiguration`] for more details.
|
See {code-spring-boot-hibernate-src}/autoconfigure/HibernateJpaAutoConfiguration.java[`HibernateJpaAutoConfiguration`] and {code-spring-boot-jpa-src}/autoconfigure/JpaBaseConfiguration.java[`JpaBaseConfiguration`] for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -341,7 +341,7 @@ include-code::CustomerConfiguration[]
|
|||||||
Spring Boot will not search for or use a `META-INF/persistence.xml` by default.
|
Spring Boot will not search for or use a `META-INF/persistence.xml` by default.
|
||||||
If you prefer to use a traditional `persistence.xml`, you need to define your own javadoc:org.springframework.context.annotation.Bean[format=annotation] of type javadoc:org.springframework.orm.jpa.LocalEntityManagerFactoryBean[] (with an ID of '`entityManagerFactory`') and set the persistence unit name there.
|
If you prefer to use a traditional `persistence.xml`, you need to define your own javadoc:org.springframework.context.annotation.Bean[format=annotation] of type javadoc:org.springframework.orm.jpa.LocalEntityManagerFactoryBean[] (with an ID of '`entityManagerFactory`') and set the persistence unit name there.
|
||||||
|
|
||||||
See {code-spring-boot-autoconfigure-src}/orm/jpa/JpaBaseConfiguration.java[`JpaBaseConfiguration`] for the default settings.
|
See {code-spring-boot-jpa-src}/autoconfigure/JpaBaseConfiguration.java[`JpaBaseConfiguration`] for the default settings.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -401,6 +401,6 @@ include-code::ElasticsearchEntityManagerFactoryDependsOnPostProcessor[]
|
|||||||
== Configure jOOQ with Two DataSources
|
== Configure jOOQ with Two DataSources
|
||||||
|
|
||||||
If you need to use jOOQ with multiple data sources, you should create your own javadoc:org.jooq.DSLContext[] for each one.
|
If you need to use jOOQ with multiple data sources, you should create your own javadoc:org.jooq.DSLContext[] for each one.
|
||||||
See {code-spring-boot-autoconfigure-src}/jooq/JooqAutoConfiguration.java[`JooqAutoConfiguration`] for more details.
|
See {code-spring-boot-jooq-src}/autoconfigure/JooqAutoConfiguration.java[`JooqAutoConfiguration`] for more details.
|
||||||
|
|
||||||
TIP: In particular, javadoc:org.springframework.boot.jooq.autoconfigure.ExceptionTranslatorExecuteListener[] and javadoc:org.springframework.boot.jooq.autoconfigure.SpringTransactionProvider[] can be reused to provide similar features to what the auto-configuration does with a single javadoc:javax.sql.DataSource[].
|
TIP: In particular, javadoc:org.springframework.boot.jooq.autoconfigure.ExceptionTranslatorExecuteListener[] and javadoc:org.springframework.boot.jooq.autoconfigure.SpringTransactionProvider[] can be reused to provide similar features to what the auto-configuration does with a single javadoc:javax.sql.DataSource[].
|
||||||
|
|||||||
+3
-3
@@ -37,7 +37,7 @@ If you use the `spring-boot-devtools` module, these properties are xref:referenc
|
|||||||
=== Thymeleaf Templates
|
=== Thymeleaf Templates
|
||||||
|
|
||||||
If you use Thymeleaf, set `spring.thymeleaf.cache` to `false`.
|
If you use Thymeleaf, set `spring.thymeleaf.cache` to `false`.
|
||||||
See {code-spring-boot-autoconfigure-src}/thymeleaf/ThymeleafAutoConfiguration.java[`ThymeleafAutoConfiguration`] for other Thymeleaf customization options.
|
See {code-spring-boot-thymeleaf-src}/autoconfigure/ThymeleafAutoConfiguration.java[`ThymeleafAutoConfiguration`] for other Thymeleaf customization options.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ See {code-spring-boot-autoconfigure-src}/thymeleaf/ThymeleafAutoConfiguration.ja
|
|||||||
=== FreeMarker Templates
|
=== FreeMarker Templates
|
||||||
|
|
||||||
If you use FreeMarker, set `spring.freemarker.cache` to `false`.
|
If you use FreeMarker, set `spring.freemarker.cache` to `false`.
|
||||||
See {code-spring-boot-autoconfigure-src}/freemarker/FreeMarkerAutoConfiguration.java[`FreeMarkerAutoConfiguration`] for other FreeMarker customization options.
|
See {code-spring-boot-freemarker-src}/autoconfigure/FreeMarkerAutoConfiguration.java[`FreeMarkerAutoConfiguration`] for other FreeMarker customization options.
|
||||||
|
|
||||||
NOTE: Template caching for FreeMarker is not supported with WebFlux.
|
NOTE: Template caching for FreeMarker is not supported with WebFlux.
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ NOTE: Template caching for FreeMarker is not supported with WebFlux.
|
|||||||
=== Groovy Templates
|
=== Groovy Templates
|
||||||
|
|
||||||
If you use Groovy templates, set `spring.groovy.template.cache` to `false`.
|
If you use Groovy templates, set `spring.groovy.template.cache` to `false`.
|
||||||
See {code-spring-boot-autoconfigure-src}/groovy/template/GroovyTemplateAutoConfiguration.java[`GroovyTemplateAutoConfiguration`] for other Groovy customization options.
|
See {code-spring-boot-groovy-templates-src}/autoconfigure/GroovyTemplateAutoConfiguration.java[`GroovyTemplateAutoConfiguration`] for other Groovy customization options.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ If you provide any javadoc:org.springframework.context.annotation.Bean[format=an
|
|||||||
Also, a convenience bean of type javadoc:org.springframework.boot.http.converter.autoconfigure.HttpMessageConverters[] is provided (and is always available if you use the default MVC configuration).
|
Also, a convenience bean of type javadoc:org.springframework.boot.http.converter.autoconfigure.HttpMessageConverters[] is provided (and is always available if you use the default MVC configuration).
|
||||||
It has some useful methods to access the default and user-enhanced message converters.
|
It has some useful methods to access the default and user-enhanced message converters.
|
||||||
|
|
||||||
See the xref:spring-mvc.adoc#howto.spring-mvc.customize-responsebody-rendering[] section and the {code-spring-boot-autoconfigure-src}/web/servlet/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`] source code for more details.
|
See the xref:spring-mvc.adoc#howto.spring-mvc.customize-responsebody-rendering[] section and the {code-spring-boot-webmvc-src}/autoconfigure/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`] source code for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ As in normal MVC usage, any javadoc:org.springframework.web.servlet.config.annot
|
|||||||
However, unlike with normal MVC, you can supply only additional converters that you need (because Spring Boot uses the same mechanism to contribute its defaults).
|
However, unlike with normal MVC, you can supply only additional converters that you need (because Spring Boot uses the same mechanism to contribute its defaults).
|
||||||
Finally, if you opt out of the default Spring Boot MVC configuration by providing your own javadoc:org.springframework.web.servlet.config.annotation.EnableWebMvc[format=annotation] configuration, you can take control completely and do everything manually by using `getMessageConverters` from javadoc:org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport[].
|
Finally, if you opt out of the default Spring Boot MVC configuration by providing your own javadoc:org.springframework.web.servlet.config.annotation.EnableWebMvc[format=annotation] configuration, you can take control completely and do everything manually by using `getMessageConverters` from javadoc:org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport[].
|
||||||
|
|
||||||
See the {code-spring-boot-autoconfigure-src}/web/servlet/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`] source code for more details.
|
See the {code-spring-boot-webmvc-src}/autoconfigure/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`] source code for more details.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ For example, if you want to specify that files be unlimited, set the configprop:
|
|||||||
|
|
||||||
The multipart support is helpful when you want to receive multipart encoded file data as a javadoc:org.springframework.web.bind.annotation.RequestParam[format=annotation]-annotated parameter of type javadoc:org.springframework.web.multipart.MultipartFile[] in a Spring MVC controller handler method.
|
The multipart support is helpful when you want to receive multipart encoded file data as a javadoc:org.springframework.web.bind.annotation.RequestParam[format=annotation]-annotated parameter of type javadoc:org.springframework.web.multipart.MultipartFile[] in a Spring MVC controller handler method.
|
||||||
|
|
||||||
See the {code-spring-boot-autoconfigure-src}/web/servlet/MultipartAutoConfiguration.java[`MultipartAutoConfiguration`] source for more details.
|
See the {code-spring-boot-servlet-src}/autoconfigure/MultipartAutoConfiguration.java[`MultipartAutoConfiguration`] source for more details.
|
||||||
|
|
||||||
NOTE: It is recommended to use the container's built-in support for multipart uploads rather than introduce an additional dependency such as Apache Commons File Upload.
|
NOTE: It is recommended to use the container's built-in support for multipart uploads rather than introduce an additional dependency such as Apache Commons File Upload.
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ Spring Boot, on the other hand, installs one or two for you, depending on what i
|
|||||||
The javadoc:org.springframework.web.servlet.DispatcherServlet[] uses all the resolvers it finds in the application context, trying each one in turn until it gets a result.
|
The javadoc:org.springframework.web.servlet.DispatcherServlet[] uses all the resolvers it finds in the application context, trying each one in turn until it gets a result.
|
||||||
If you add your own, you have to be aware of the order and in which position your resolver is added.
|
If you add your own, you have to be aware of the order and in which position your resolver is added.
|
||||||
|
|
||||||
javadoc:org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration[] adds the following javadoc:org.springframework.web.servlet.ViewResolver[] beans to your context:
|
javadoc:org.springframework.boot.webmvc.autoconfigure.WebMvcAutoConfiguration[] adds the following javadoc:org.springframework.web.servlet.ViewResolver[] beans to your context:
|
||||||
|
|
||||||
* An javadoc:org.springframework.web.servlet.view.InternalResourceViewResolver[] named '`defaultViewResolver`'.
|
* An javadoc:org.springframework.web.servlet.view.InternalResourceViewResolver[] named '`defaultViewResolver`'.
|
||||||
This one locates physical resources that can be rendered by using the `DefaultServlet` (including static resources and JSP pages, if you use those).
|
This one locates physical resources that can be rendered by using the `DefaultServlet` (including static resources and JSP pages, if you use those).
|
||||||
@@ -231,10 +231,10 @@ javadoc:org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfigurati
|
|||||||
|
|
||||||
For more detail, see the following sections:
|
For more detail, see the following sections:
|
||||||
|
|
||||||
* {code-spring-boot-autoconfigure-src}/web/servlet/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`]
|
* {code-spring-boot-webmvc-src}/autoconfigure/WebMvcAutoConfiguration.java[`WebMvcAutoConfiguration`]
|
||||||
* {code-spring-boot-autoconfigure-src}/thymeleaf/ThymeleafAutoConfiguration.java[`ThymeleafAutoConfiguration`]
|
* {code-spring-boot-thymeleaf-src}/autoconfigure/ThymeleafAutoConfiguration.java[`ThymeleafAutoConfiguration`]
|
||||||
* {code-spring-boot-autoconfigure-src}/freemarker/FreeMarkerAutoConfiguration.java[`FreeMarkerAutoConfiguration`]
|
* {code-spring-boot-freemarker-src}/autoconfigure/FreeMarkerAutoConfiguration.java[`FreeMarkerAutoConfiguration`]
|
||||||
* {code-spring-boot-autoconfigure-src}/groovy/template/GroovyTemplateAutoConfiguration.java[`GroovyTemplateAutoConfiguration`]
|
* {code-spring-boot-groovy-templates-src}/autoconfigure/GroovyTemplateAutoConfiguration.java[`GroovyTemplateAutoConfiguration`]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -252,6 +252,6 @@ For example, if you use Thymeleaf, you can add an `error.html` template.
|
|||||||
If you use FreeMarker, you can add an `error.ftlh` template.
|
If you use FreeMarker, you can add an `error.ftlh` template.
|
||||||
In general, you need a javadoc:org.springframework.web.servlet.View[] that resolves with a name of `error` or a javadoc:org.springframework.stereotype.Controller[format=annotation] that handles the `/error` path.
|
In general, you need a javadoc:org.springframework.web.servlet.View[] that resolves with a name of `error` or a javadoc:org.springframework.stereotype.Controller[format=annotation] that handles the `/error` path.
|
||||||
Unless you replaced some of the default configuration, you should find a javadoc:org.springframework.web.servlet.view.BeanNameViewResolver[] in your javadoc:org.springframework.context.ApplicationContext[], so a javadoc:org.springframework.context.annotation.Bean[format=annotation] named `error` would be one way of doing that.
|
Unless you replaced some of the default configuration, you should find a javadoc:org.springframework.web.servlet.view.BeanNameViewResolver[] in your javadoc:org.springframework.context.ApplicationContext[], so a javadoc:org.springframework.context.annotation.Bean[format=annotation] named `error` would be one way of doing that.
|
||||||
See {code-spring-boot-autoconfigure-src}/web/servlet/error/ErrorMvcAutoConfiguration.java[`ErrorMvcAutoConfiguration`] for more options.
|
See {code-spring-boot-webmvc-src}/autoconfigure/error/ErrorMvcAutoConfiguration.java[`ErrorMvcAutoConfiguration`] for more options.
|
||||||
|
|
||||||
See also the section on xref:reference:web/servlet.adoc#web.servlet.spring-mvc.error-handling[] for details of how to register handlers in the servlet container.
|
See also the section on xref:reference:web/servlet.adoc#web.servlet.spring-mvc.error-handling[] for details of how to register handlers in the servlet container.
|
||||||
|
|||||||
+1
-1
@@ -44,4 +44,4 @@ spring:
|
|||||||
----
|
----
|
||||||
|
|
||||||
|
|
||||||
See javadoc:org.springframework.boot.batch.autoconfigure.BatchAutoConfiguration[] and javadoc:org.springframework.boot.batch.jdbc.autoconfigure.BatchJdbcAutoConfiguration[] for more details.
|
See {code-spring-boot-batch-src}/autoconfigure/BatchAutoConfiguration.java[`BatchAutoConfiguration`] and {code-spring-boot-batch-jdbc-src}/autoconfigure/BatchJdbcAutoConfiguration.java[`BatchJdbcAutoConfiguration`] for more details.
|
||||||
|
|||||||
+1
-1
@@ -46,4 +46,4 @@ spring:
|
|||||||
uri: "ws://example.org"
|
uri: "ws://example.org"
|
||||||
----
|
----
|
||||||
|
|
||||||
See the {code-spring-boot-autoconfigure-src}/integration/IntegrationAutoConfiguration.java[`IntegrationAutoConfiguration`] and javadoc:org.springframework.boot.autoconfigure.integration.IntegrationProperties[] classes for more details.
|
See the {code-spring-boot-integration-src}/autoconfigure/IntegrationAutoConfiguration.java[`IntegrationAutoConfiguration`] and javadoc:org.springframework.boot.autoconfigure.integration.IntegrationProperties[] classes for more details.
|
||||||
|
|||||||
Reference in New Issue
Block a user