You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/metrics.adoc
+3-3
Original file line number
Diff line number
Diff line change
@@ -755,7 +755,7 @@ Auto-configuration enables the instrumentation of all requests handled by Spring
755
755
By default, metrics are generated with the name, `http.server.requests`.
756
756
You can customize the name by setting the configprop:management.observations.http.server.requests.name[] property.
757
757
758
-
See the {spring-framework-docs}/integration.html#integration.observability.http-server.servlet[Spring Framework reference documentation for more information on produced observations].
758
+
See the {spring-framework-docs}/integration/observability.html#observability.http-server.servlet[Spring Framework reference documentation for more information on produced observations].
759
759
760
760
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.server.observation` package.
761
761
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
@@ -775,7 +775,7 @@ Auto-configuration enables the instrumentation of all requests handled by Spring
775
775
By default, metrics are generated with the name, `http.server.requests`.
776
776
You can customize the name by setting the configprop:management.observations.http.server.requests.name[] property.
777
777
778
-
See the {spring-framework-docs}/integration.html#integration.observability.http-server.reactive[Spring Framework reference documentation for more information on produced observations].
778
+
See the {spring-framework-docs}/integration/observability.html#observability.http-server.reactive[Spring Framework reference documentation for more information on produced observations].
779
779
780
780
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.server.reactive.observation` package.
781
781
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
@@ -830,7 +830,7 @@ You can also manually apply the customizers responsible for this instrumentation
830
830
By default, metrics are generated with the name, `http.client.requests`.
831
831
You can customize the name by setting the configprop:management.observations.http.client.requests.name[] property.
832
832
833
-
See the {spring-framework-docs}/integration.html#integration.observability.http-client[Spring Framework reference documentation for more information on produced observations].
833
+
See the {spring-framework-docs}/integration/observability.html#observability.http-client[Spring Framework reference documentation for more information on produced observations].
834
834
835
835
To customize the tags when using `RestTemplate`, provide a `@Bean` that implements `ClientRequestObservationConvention` from the `org.springframework.http.client.observation` package.
836
836
To customize the tags when using `WebClient`, provide a `@Bean` that implements `ClientRequestObservationConvention` from the `org.springframework.web.reactive.function.client` package.
The `@ConditionalOnExpression` annotation lets configuration be included based on the result of a {spring-framework-docs}/core.html#expressions[SpEL expression].
139
+
The `@ConditionalOnExpression` annotation lets configuration be included based on the result of a {spring-framework-docs}/core/expressions.html[SpEL expression].
140
140
141
141
NOTE: Referencing a bean in the expression will cause that bean to be initialized very early in context refresh processing.
142
142
As a result, the bean won't be eligible for post-processing (such as configuration properties binding) and its state may be incomplete.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/kotlin.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
https://kotlinlang.org[Kotlin] is a statically-typed language targeting the JVM (and other platforms) which allows writing concise and elegant code while providing {kotlin-docs}java-interop.html[interoperability] with existing libraries written in Java.
4
4
5
5
Spring Boot provides Kotlin support by leveraging the support in other Spring projects such as Spring Framework, Spring Data, and Reactor.
6
-
See the {spring-framework-docs}/languages.html#kotlin[Spring Framework Kotlin support documentation] for more information.
6
+
See the {spring-framework-docs}/languages/kotlin.html[Spring Framework Kotlin support documentation] for more information.
7
7
8
8
The easiest way to start with Spring Boot and Kotlin is to follow https://spring.io/guides/tutorials/spring-boot-kotlin/[this comprehensive tutorial].
9
9
You can create new Kotlin projects by using https://start.spring.io/#!language=kotlin[start.spring.io].
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/spring-application.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -356,7 +356,7 @@ TIP: If you want to know on which HTTP port the application is running, get the
356
356
=== Application Startup tracking
357
357
During the application startup, the `SpringApplication` and the `ApplicationContext` perform many tasks related to the application lifecycle,
358
358
the beans lifecycle or even processing application events.
359
-
With {spring-framework-api}/core/metrics/ApplicationStartup.html[`ApplicationStartup`], Spring Framework {spring-framework-docs}/core.html#context-functionality-startup[allows you to track the application startup sequence with `StartupStep` objects].
359
+
With {spring-framework-api}/core/metrics/ApplicationStartup.html[`ApplicationStartup`], Spring Framework {spring-framework-docs}/core/beans/context-introduction.html#context-functionality-startup[allows you to track the application startup sequence with `StartupStep` objects].
360
360
This data can be collected for profiling purposes, or just to have a better understanding of an application startup process.
361
361
362
362
You can choose an `ApplicationStartup` implementation when setting up the `SpringApplication` instance.
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc
+10-10
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ To use the vintage engine, add a dependency on `junit-vintage-engine`, as shown
35
35
The `spring-boot-starter-test` "`Starter`" (in the `test` `scope`) contains the following provided libraries:
36
36
37
37
* https://junit.org/junit5/[JUnit 5]: The de-facto standard for unit testing Java applications.
38
-
* {spring-framework-docs}/testing.html#integration-testing[Spring Test] & Spring Boot Test: Utilities and integration test support for Spring Boot applications.
38
+
* {spring-framework-docs}/testing/integration.html[Spring Test] & Spring Boot Test: Utilities and integration test support for Spring Boot applications.
39
39
* https://assertj.github.io/doc/[AssertJ]: A fluent assertion library.
40
40
* https://github.com/hamcrest/JavaHamcrest[Hamcrest]: A library of matcher objects (also known as constraints or predicates).
41
41
* https://site.mockito.org/[Mockito]: A Java mocking framework.
@@ -60,7 +60,7 @@ It is useful to be able to perform integration testing without requiring deploym
60
60
The Spring Framework includes a dedicated test module for such integration testing.
61
61
You can declare a dependency directly to `org.springframework:spring-test` or use the `spring-boot-starter-test` "`Starter`" to pull it in transitively.
62
62
63
-
If you have not used the `spring-test` module before, you should start by reading the {spring-framework-docs}/testing.html#testing[relevant section] of the Spring Framework reference documentation.
63
+
If you have not used the `spring-test` module before, you should start by reading the {spring-framework-docs}/testing.html[relevant section] of the Spring Framework reference documentation.
By default, `@SpringBootTest` does not start the server but instead sets up a mock environment for testing web endpoints.
201
201
202
-
With Spring MVC, we can query our web endpoints using {spring-framework-docs}/testing.html#spring-mvc-test-framework[`MockMvc`] or `WebTestClient`, as shown in the following example:
202
+
With Spring MVC, we can query our web endpoints using {spring-framework-docs}/testing/spring-mvc-test-framework.html[`MockMvc`] or `WebTestClient`, as shown in the following example:
203
203
204
204
include::code:MyMockMvcTests[]
205
205
206
206
TIP: If you want to focus only on the web layer and not start a complete `ApplicationContext`, consider <<features#features.testing.spring-boot-applications.spring-mvc-tests,using `@WebMvcTest` instead>>.
207
207
208
-
With Spring WebFlux endpoints, you can use {spring-framework-docs}/testing.html#webtestclient-tests[`WebTestClient`] as shown in the following example:
208
+
With Spring WebFlux endpoints, you can use {spring-framework-docs}/testing/webtestclient.html[`WebTestClient`] as shown in the following example:
209
209
210
210
include::code:MyMockWebTestClientTests[]
211
211
@@ -227,7 +227,7 @@ If you need to start a full running server, we recommend that you use random por
227
227
If you use `@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)`, an available port is picked at random each time your test runs.
228
228
229
229
The `@LocalServerPort` annotation can be used to <<howto#howto.webserver.discover-port,inject the actual port used>> into your test.
230
-
For convenience, tests that need to make REST calls to the started server can additionally `@Autowire` a {spring-framework-docs}/testing.html#webtestclient-tests[`WebTestClient`], which resolves relative links to the running server and comes with a dedicated API for verifying responses, as shown in the following example:
230
+
For convenience, tests that need to make REST calls to the started server can additionally `@Autowire` a {spring-framework-docs}/testing/webtestclient.html[`WebTestClient`], which resolves relative links to the running server and comes with a dedicated API for verifying responses, as shown in the following example:
231
231
232
232
include::code:MyRandomPortWebTestClientTests[]
233
233
@@ -420,7 +420,7 @@ TIP: If you need to register extra components, such as Jackson `Module`, you can
420
420
421
421
Often, `@WebFluxTest` is limited to a single controller and used in combination with the `@MockBean` annotation to provide mock implementations for required collaborators.
422
422
423
-
`@WebFluxTest` also auto-configures {spring-framework-docs}/testing.html#webtestclient[`WebTestClient`], which offers a powerful way to quickly test WebFlux controllers without needing to start a full HTTP server.
423
+
`@WebFluxTest` also auto-configures {spring-framework-docs}/testing/webtestclient.html[`WebTestClient`], which offers a powerful way to quickly test WebFlux controllers without needing to start a full HTTP server.
424
424
425
425
TIP: You can also auto-configure `WebTestClient` in a non-`@WebFluxTest` (such as `@SpringBootTest`) by annotating it with `@AutoConfigureWebTestClient`.
426
426
The following example shows a class that uses both `@WebFluxTest` and a `WebTestClient`:
@@ -560,7 +560,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t
560
560
TIP: A list of the auto-configuration settings that are enabled by `@DataJpaTest` can be <<test-auto-configuration#appendix.test-auto-configuration,found in the appendix>>.
561
561
562
562
By default, data JPA tests are transactional and roll back at the end of each test.
563
-
See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
563
+
See the {spring-framework-docs}/testing/testcontext-framework/tx.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
564
564
If that is not what you want, you can disable transaction management for a test or for the whole class as follows:
565
565
566
566
include::code:MyNonTransactionalTests[]
@@ -592,7 +592,7 @@ Regular `@Component` and `@ConfigurationProperties` beans are not scanned when t
592
592
TIP: A list of the auto-configurations that are enabled by `@JdbcTest` can be <<test-auto-configuration#appendix.test-auto-configuration,found in the appendix>>.
593
593
594
594
By default, JDBC tests are transactional and roll back at the end of each test.
595
-
See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
595
+
See the {spring-framework-docs}/testing/testcontext-framework/tx.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
596
596
If that is not what you want, you can disable transaction management for a test or for the whole class, as follows:
597
597
598
598
include::code:MyTransactionalTests[]
@@ -612,7 +612,7 @@ Only `AbstractJdbcConfiguration` subclasses are scanned when the `@DataJdbcTest`
612
612
TIP: A list of the auto-configurations that are enabled by `@DataJdbcTest` can be <<test-auto-configuration#appendix.test-auto-configuration,found in the appendix>>.
613
613
614
614
By default, Data JDBC tests are transactional and roll back at the end of each test.
615
-
See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
615
+
See the {spring-framework-docs}/testing/testcontext-framework/tx.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
616
616
If that is not what you want, you can disable transaction management for a test or for the whole test class as <<features#features.testing.spring-boot-applications.autoconfigured-jdbc,shown in the JDBC example>>.
617
617
618
618
If you prefer your test to run against a real database, you can use the `@AutoConfigureTestDatabase` annotation in the same way as for `@DataJpaTest`.
@@ -688,7 +688,7 @@ The following example shows a typical setup for using Neo4J tests in Spring Boot
688
688
include::code:propagation/MyDataNeo4jTests[]
689
689
690
690
By default, Data Neo4j tests are transactional and roll back at the end of each test.
691
-
See the {spring-framework-docs}/testing.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
691
+
See the {spring-framework-docs}/testing/testcontext-framework/tx.html#testcontext-tx-enabling-transactions[relevant section] in the Spring Framework Reference Documentation for more details.
692
692
If that is not what you want, you can disable transaction management for a test or for the whole class, as follows:
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc
+1-1
Original file line number
Diff line number
Diff line change
@@ -409,7 +409,7 @@ There are also non-standard headers, like `X-Forwarded-Host`, `X-Forwarded-Port`
409
409
If the proxy adds the commonly used `X-Forwarded-For` and `X-Forwarded-Proto` headers, setting `server.forward-headers-strategy` to `NATIVE` is enough to support those.
410
410
With this option, the Web servers themselves natively support this feature; you can check their specific documentation to learn about specific behavior.
411
411
412
-
If this is not enough, Spring Framework provides a {spring-framework-docs}/web.html#filters-forwarded-headers[ForwardedHeaderFilter] for the servlet stack and a {spring-framework-docs}/web-reactive.html#webflux-forwarded-headers[ForwardedHeaderTransformer] for the reactive stack.
412
+
If this is not enough, Spring Framework provides a {spring-framework-docs}/web/webmvc/filters.html#filters-forwarded-headers[ForwardedHeaderFilter] for the servlet stack and a {spring-framework-docs}/web/webflux/reactive-spring.html#webflux-forwarded-headers[ForwardedHeaderTransformer] for the reactive stack.
413
413
You can use them in your application by setting configprop:server.forward-headers-strategy[] to `FRAMEWORK`.
414
414
415
415
TIP: If you are using Tomcat and terminating SSL at the proxy, configprop:server.tomcat.redirect-context-root[] should be set to `false`.
0 commit comments