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/deployment.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,7 @@ Process-scoped environment variables are language agnostic.
135
135
136
136
Environment variables do not always make for the easiest API, so Spring Boot automatically extracts them and flattens the data into properties that can be accessed through Spring's `Environment` abstraction, as shown in the following example:
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started.adoc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -483,7 +483,7 @@ If you run `mvn dependency:tree` again, you see that there are now a number of a
483
483
To finish our application, we need to create a single Java file.
484
484
By default, Maven compiles sources from `src/main/java`, so you need to create that directory structure and then add a file named `src/main/java/Example.java` to contain the following code:
Copy file name to clipboardExpand all lines: spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto.adoc
+27-27Lines changed: 27 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -239,7 +239,7 @@ Then the Spring Boot banner is not printed on startup, and the application is no
239
239
Properties defined in external configuration override the values specified with the Java API, with the notable exception of the sources used to create the `ApplicationContext`.
240
240
Consider the following application:
241
241
242
-
[source,java,indent=0]
242
+
[source,java,pending-extract=true,indent=0]
243
243
----
244
244
new SpringApplicationBuilder()
245
245
.bannerMode(Banner.Mode.OFF)
@@ -513,7 +513,7 @@ The best way to get that and be sure it has been initialized is to add a `@Bean`
513
513
514
514
Tests that use `@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)` can also inject the actual port into a field by using the `@LocalServerPort` annotation, as shown in the following example:
@@ -802,7 +802,7 @@ Like any other Spring bean, you can define the order of Servlet filter beans; pl
802
802
As <<howto-add-a-servlet-filter-or-listener-as-spring-bean,described earlier>>, any `Servlet` or `Filter` beans are registered with the servlet container automatically.
803
803
To disable registration of a particular `Filter` or `Servlet` bean, create a registration bean for it and mark it as disabled, as shown in the following example:
=== Create WebSocket Endpoints Using @ServerEndpoint
988
988
If you want to use `@ServerEndpoint` in a Spring Boot application that used an embedded container, you must declare a single `ServerEndpointExporter` `@Bean`, as shown in the following example:
public ServerEndpointExporter serverEndpointExporter() {
@@ -1012,7 +1012,7 @@ This section answers common questions about Spring MVC and Spring Boot.
1012
1012
=== Write a JSON REST Service
1013
1013
Any Spring `@RestController` in a Spring Boot application should render JSON response by default as long as Jackson2 is on the classpath, as shown in the following example:
@@ -1046,7 +1046,7 @@ To use the Jackson XML renderer, add the following dependency to your project:
1046
1046
1047
1047
If Jackson's XML extension is not available and JAXB is available, XML can be rendered with the additional requirement of having `MyThing` annotated as `@XmlRootElement`, as shown in the following example:
@@ -1251,7 +1251,7 @@ For more detail, see the following sections:
1251
1251
Spring Security provides support for running tests as a specific user.
1252
1252
For example, the test in the snippet below will run with an authenticated user that has the `ADMIN` role.
1253
1253
1254
-
[source,java,indent=0]
1254
+
[source,java,pending-extract=true,indent=0]
1255
1255
----
1256
1256
@Test
1257
1257
@WithMockUser(roles="ADMIN")
@@ -1294,7 +1294,7 @@ To use Jersey alongside another web framework, such as Spring MVC, it should be
1294
1294
First, configure Jersey to use a Filter rather than a Servlet by configuring the configprop:spring.jersey.type[] application property with a value of `filter`.
1295
1295
Second, configure your `ResourceConfig` to forward requests that would have resulted in a 404, as shown in the following example.
@@ -2206,7 +2206,7 @@ If your JMS broker does not support transacted sessions, you have to disable the
2206
2206
If you create your own `JmsListenerContainerFactory`, there is nothing to do, since, by default it cannot be transacted.
2207
2207
If you want to use the `DefaultJmsListenerContainerFactoryConfigurer` to reuse Spring Boot's default, you can disable transacted sessions, as follows:
2208
2208
2209
-
[source,java,indent=0]
2209
+
[source,java,pending-extract=true,indent=0]
2210
2210
----
2211
2211
@Bean
2212
2212
public DefaultJmsListenerContainerFactory jmsListenerContainerFactory(
@@ -2399,7 +2399,7 @@ Alternatively, you can add the `RemoteIpValve` by customizing the `TomcatServlet
2399
2399
2400
2400
To configure Spring Security to require a secure channel for all (or some) requests, consider adding your own `SecurityFilterChain` bean that adds the following `HttpSecurity` configuration:
public class Application extends SpringBootServletInitializer {
@@ -2875,7 +2875,7 @@ See the https://spring.io/guides/gs/convert-jar-to-war/[Getting Started Guide on
2875
2875
2876
2876
To create a deployable war by extending `SpringBootServletInitializer` (for example, in a class called `Application`) and adding the Spring Boot `@SpringBootApplication` annotation, use code similar to that shown in the following example:
@@ -2919,7 +2919,7 @@ Once the war file is working, you can make it executable by adding a `main` meth
2919
2919
====
2920
2920
If you intend to start your application as a war or as an executable application, you need to share the customizations of the builder in a method that is both available to the `SpringBootServletInitializer` callback and in the `main` method in a class similar to the following:
0 commit comments