Use consistent asciidoctor subs attribute
Closes gh-25101
This commit is contained in:
@@ -25,7 +25,7 @@ Doing so enables debug logs for a selection of core loggers and logs a condition
|
||||
=== Disabling Specific Auto-configuration Classes
|
||||
If you find that specific auto-configuration classes that you do not want are being applied, you can use the exclude attribute of `@SpringBootApplication` to disable them, as shown in the following example:
|
||||
|
||||
[source,java,indent=0]
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/using/autoconfiguration/disablingspecific/MyApplication.java[]
|
||||
----
|
||||
|
||||
@@ -47,7 +47,7 @@ The `spring-boot-antlib` "`AntLib`" module is also available to help Ant create
|
||||
|
||||
To declare dependencies, a typical `ivy.xml` file looks something like the following example:
|
||||
|
||||
[source,xml,indent=0]
|
||||
[source,xml,indent=0,subs="verbatim"]
|
||||
----
|
||||
<ivy-module version="2.0">
|
||||
<info organisation="org.springframework.boot" module="spring-boot-sample-ant" />
|
||||
@@ -64,7 +64,7 @@ To declare dependencies, a typical `ivy.xml` file looks something like the follo
|
||||
|
||||
A typical `build.xml` looks like the following example:
|
||||
|
||||
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
|
||||
[source,xml,indent=0,subs="verbatim,attributes"]
|
||||
----
|
||||
<project
|
||||
xmlns:ivy="antlib:org.apache.ivy.ant"
|
||||
|
||||
@@ -5,7 +5,7 @@ The `spring-boot-devtools` module can be included in any project to provide addi
|
||||
To include devtools support, add the module dependency to your build, as shown in the following listings for Maven and Gradle:
|
||||
|
||||
.Maven
|
||||
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
|
||||
[source,xml,indent=0,subs="verbatim"]
|
||||
----
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -17,7 +17,7 @@ To include devtools support, add the module dependency to your build, as shown i
|
||||
----
|
||||
|
||||
.Gradle
|
||||
[source,gradle,indent=0,subs="attributes"]
|
||||
[source,gradle,indent=0,subs="verbatim"]
|
||||
----
|
||||
dependencies {
|
||||
developmentOnly("org.springframework.boot:spring-boot-devtools")
|
||||
@@ -117,7 +117,7 @@ The report shows the changes to your application's auto-configuration as you mak
|
||||
|
||||
To disable the logging of the report, set the following property:
|
||||
|
||||
[source,yaml,indent=0,configblocks]
|
||||
[source,yaml,indent=0,subs="verbatim",configblocks]
|
||||
----
|
||||
spring:
|
||||
devtools:
|
||||
@@ -135,7 +135,7 @@ By default, changing resources in `/META-INF/maven`, `/META-INF/resources`, `/re
|
||||
If you want to customize these exclusions, you can use the configprop:spring.devtools.restart.exclude[] property.
|
||||
For example, to exclude only `/static` and `/public` you would set the following property:
|
||||
|
||||
[source,yaml,indent=0,configblocks]
|
||||
[source,yaml,indent=0,subs="verbatim",configblocks]
|
||||
----
|
||||
spring:
|
||||
devtools:
|
||||
@@ -162,7 +162,7 @@ In most cases, you can set this property in your `application.properties` (doing
|
||||
|
||||
If you need to _completely_ disable restart support (for example, because it does not work with a specific library), you need to set the configprop:spring.devtools.restart.enabled[] `System` property to `false` before calling `SpringApplication.run(...)`, as shown in the following example:
|
||||
|
||||
[source,java,indent=0]
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/devtools/restart/disable/MyApplication.java[]
|
||||
----
|
||||
@@ -191,7 +191,7 @@ For example, if you have a project with the following structure:
|
||||
|
||||
Then your `trigger-file` property would be:
|
||||
|
||||
[source,yaml,indent=0,configprops,configblocks]
|
||||
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
|
||||
----
|
||||
spring:
|
||||
devtools:
|
||||
@@ -224,7 +224,7 @@ The `spring-devtools.properties` file can contain properties prefixed with `rest
|
||||
The `include` elements are items that should be pulled up into the "`restart`" classloader, and the `exclude` elements are items that should be pushed down into the "`base`" classloader.
|
||||
The value of the property is a regex pattern that is applied to the classpath, as shown in the following example:
|
||||
|
||||
[source,yaml,indent=0,configblocks]
|
||||
[source,yaml,indent=0,subs="verbatim",configblocks]
|
||||
----
|
||||
restart:
|
||||
exclude:
|
||||
@@ -277,7 +277,7 @@ You can configure global devtools settings by adding any of the following files
|
||||
Any properties added to these file apply to _all_ Spring Boot applications on your machine that use devtools.
|
||||
For example, to configure restart to always use a <<using#using.devtools.restart.triggerfile, trigger file>>, you would add the following property to your `spring-boot-devtools` file:
|
||||
|
||||
[source,yaml,indent=0,configprops,configblocks]
|
||||
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
|
||||
----
|
||||
spring:
|
||||
devtools:
|
||||
@@ -304,7 +304,7 @@ Profile specific filenames (of the form `spring-boot-devtools-<profile>.properti
|
||||
Since Spring Boot relies entirely on the IDE to compile and copy files into the location from where Spring Boot can read them, you might find that there are times when certain changes are not reflected when devtools restarts the application.
|
||||
If you observe such problems constantly, try increasing the `spring.devtools.restart.poll-interval` and `spring.devtools.restart.quiet-period` parameters to the values that fit your development environment:
|
||||
|
||||
[source,yaml,indent=0,configprops,configblocks]
|
||||
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
|
||||
----
|
||||
spring:
|
||||
devtools:
|
||||
@@ -328,7 +328,7 @@ You should never enable support on a production deployment.
|
||||
|
||||
To enable it, you need to make sure that `devtools` is included in the repackaged archive, as shown in the following listing:
|
||||
|
||||
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
|
||||
[source,xml,indent=0,subs="verbatim"]
|
||||
----
|
||||
<build>
|
||||
<plugins>
|
||||
@@ -368,7 +368,7 @@ For example, if you are using Eclipse or STS and you have a project named `my-ap
|
||||
|
||||
A running remote client might resemble the following listing:
|
||||
|
||||
[indent=0,subs="attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
. ____ _ __ _ _
|
||||
/\\ / ___'_ __ _ _(_)_ __ __ _ ___ _ \ \ \ \
|
||||
|
||||
@@ -30,7 +30,7 @@ STS users can use the `Relaunch` button rather than the `Run` button to ensure t
|
||||
=== Running as a Packaged Application
|
||||
If you use the Spring Boot Maven or Gradle plugins to create an executable jar, you can run your application using `java -jar`, as shown in the following example:
|
||||
|
||||
[indent=0,subs="attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ java -jar target/myapplication-0.0.1-SNAPSHOT.jar
|
||||
----
|
||||
@@ -38,7 +38,7 @@ If you use the Spring Boot Maven or Gradle plugins to create an executable jar,
|
||||
It is also possible to run a packaged application with remote debugging support enabled.
|
||||
Doing so lets you attach a debugger to your packaged application, as shown in the following example:
|
||||
|
||||
[indent=0,subs="attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n \
|
||||
-jar target/myapplication-0.0.1-SNAPSHOT.jar
|
||||
@@ -52,14 +52,14 @@ The Spring Boot Maven plugin includes a `run` goal that can be used to quickly c
|
||||
Applications run in an exploded form, as they do in your IDE.
|
||||
The following example shows a typical Maven command to run a Spring Boot application:
|
||||
|
||||
[indent=0,subs="attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ mvn spring-boot:run
|
||||
----
|
||||
|
||||
You might also want to use the `MAVEN_OPTS` operating system environment variable, as shown in the following example:
|
||||
|
||||
[indent=0,subs="attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ export MAVEN_OPTS=-Xmx1024m
|
||||
----
|
||||
@@ -71,14 +71,14 @@ You might also want to use the `MAVEN_OPTS` operating system environment variabl
|
||||
The Spring Boot Gradle plugin also includes a `bootRun` task that can be used to run your application in an exploded form.
|
||||
The `bootRun` task is added whenever you apply the `org.springframework.boot` and `java` plugins and is shown in the following example:
|
||||
|
||||
[indent=0,subs="attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ gradle bootRun
|
||||
----
|
||||
|
||||
You might also want to use the `JAVA_OPTS` operating system environment variable, as shown in the following example:
|
||||
|
||||
[indent=0,subs="attributes"]
|
||||
[indent=0,subs="verbatim"]
|
||||
----
|
||||
$ export JAVA_OPTS=-Xmx1024m
|
||||
----
|
||||
|
||||
@@ -8,14 +8,14 @@ All of your application components (`@Component`, `@Service`, `@Repository`, `@C
|
||||
|
||||
The following example shows a `@Service` Bean that uses constructor injection to obtain a required `RiskAssessor` bean:
|
||||
|
||||
[source,java,indent=0]
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/using/springbeansanddependencyinjection/singleconstructor/MyAccountService.java[]
|
||||
----
|
||||
|
||||
If a bean has more than one constructor, you'll need to mark the one you want Spring to use with `@Autowired`:
|
||||
|
||||
[source,java,indent=0]
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/using/springbeansanddependencyinjection/multipleconstructors/MyAccountService.java[]
|
||||
----
|
||||
|
||||
@@ -48,7 +48,7 @@ The following listing shows a typical layout:
|
||||
|
||||
The `MyApplication.java` file would declare the `main` method, along with the basic `@SpringBootApplication`, as follows:
|
||||
|
||||
[source,java,indent=0]
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/using/structuringyourcode/locatingthemainclass/MyApplication.java[]
|
||||
----
|
||||
|
||||
@@ -7,7 +7,7 @@ A single `@SpringBootApplication` annotation can be used to enable those three f
|
||||
* `@ComponentScan`: enable `@Component` scan on the package where the application is located (see <<using#using.structuring-your-code,the best practices>>)
|
||||
* `@Configuration`: allow to register extra beans in the context or import additional configuration classes
|
||||
|
||||
[source,java,indent=0]
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/using/usingthespringbootapplicationannotation/springapplication/MyApplication.java[]
|
||||
----
|
||||
@@ -19,7 +19,7 @@ NOTE: `@SpringBootApplication` also provides aliases to customize the attributes
|
||||
None of these features are mandatory and you may choose to replace this single annotation by any of the features that it enables.
|
||||
For instance, you may not want to use component scan or configuration properties scan in your application:
|
||||
|
||||
[source,java,indent=0]
|
||||
[source,java,indent=0,subs="verbatim"]
|
||||
----
|
||||
include::{docs-java}/using/usingthespringbootapplicationannotation/individualannotations/MyApplication.java[]
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user