Escape ...*... outputs using +...*...+

This commit is contained in:
Phillip Webb 2014-10-09 12:40:34 -07:00
parent 4ecf50a1a9
commit 7e842aee77
6 changed files with 35 additions and 35 deletions

View File

@ -140,7 +140,7 @@ file and it's used to setup an appropriate `URLClassLoader` and ultimately call
There are 3 launcher subclasses (`JarLauncher`, `WarLauncher` and `PropertiesLauncher`).
Their purpose is to load resources (`.class` files etc.) from nested jar files or war
files in directories (as opposed to explicitly on the classpath). In the case of the
`[Jar|War]Launcher` the nested paths are fixed `(lib/\*.jar` and `lib-provided/\*.jar` for
`[Jar|War]Launcher` the nested paths are fixed (`+lib/*.jar+` and `+lib-provided/*.jar+` for
the war case) so you just add extra jars in those locations if you want more. The
`PropertiesLauncher` looks in `lib/` by default, but you can add additional locations by
setting an environment variable `LOADER_PATH` or `loader.path` in `application.properties`

View File

@ -57,7 +57,7 @@ using the latest version of Java.
[[getting-started-installation-instructions-for-java]]
=== Installation instructions for the Java developer
You can use Spring Boot in the same way as any standard Java library. Simply include the
appropriate `spring-boot-*.jar` files on your classpath. Spring Boot does not require
appropriate `+spring-boot-*.jar+` files on your classpath. Spring Boot does not require
any special tools integration, so you can use any IDE or text editor; and there is
nothing special about a Spring Boot application, so you can run and debug as you would
any other Java program.

View File

@ -37,8 +37,8 @@ which not) by Spring Boot at runtime.
Many more questions can be answered by looking at the source code and the javadoc. Some
rules of thumb:
* Look for classes called `\*AutoConfiguration` and read their sources, in particular the
`@Conditional\*` annotations to find out what features they enable and when. Add
* Look for classes called `+*AutoConfiguration+` and read their sources, in particular the
`+@Conditional*+` annotations to find out what features they enable and when. Add
`--debug` to the command line or a System property `-Ddebug` to get a log on the
console of all the autoconfiguration decisions that were made in your app. In a running
Actuator app look at the `autoconfig` endpoint (`/autoconfig' or the JMX equivalent) for
@ -117,7 +117,7 @@ Application code that you want to run as your business logic can be implemented
=== Externalize the configuration of SpringApplication
A `SpringApplication` has bean properties (mainly setters) so you can use its Java API as
you create the application to modify its behavior. Or you can externalize the
configuration using properties in `spring.main.*`. E.g. in `application.properties` you
configuration using properties in `+spring.main.*+`. E.g. in `application.properties` you
might have.
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
@ -177,8 +177,8 @@ placeholders in `application.properties`, e.g.
TIP: If you are inheriting from the `spring-boot-starter-parent` POM, or if have enabled
maven filtering for the `application.properties` directly, you may want to change the
default filter token from `${\*}` since it conflicts with those placeholders.
You can either use `@*@` (i.e. `@maven.token@` instead of `${maven.token}`) or you can
default filter token from `+${*}+` since it conflicts with those placeholders.
You can either use `+@*@+` (i.e. `@maven.token@` instead of `${maven.token}`) or you can
configure the `maven-resources-plugin` to use
http://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html#delimiters[other delimiters].
@ -391,7 +391,7 @@ and then inject the actual ('`local`') port as a `@Value`. For example:
[[howto-configure-ssl]]
=== Configure SSL
SSL can be configured declaratively by setting the various `server.ssl.*` properties,
SSL can be configured declaratively by setting the various `+server.ssl.*+` properties,
typically in `application.properties` or `application.yml`. For example:
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
@ -415,7 +415,7 @@ accessible on the filesystem, i.e. it cannot be read from within a jar file.
Generally you can follow the advice from
'<<howto-discover-build-in-options-for-external-properties>>' about
`@ConfigurationProperties` (`ServerProperties` is the main one here), but also look at
`EmbeddedServletContainerCustomizer` and various Tomcat specific `*Customizers` that you
`EmbeddedServletContainerCustomizer` and various Tomcat specific `+*Customizers+` that you
can add in one of those. The Tomcat APIs are quite rich so once you have access to the
`TomcatEmbeddedServletContainerFactory` you can modify it in a number of ways. Or the
nuclear option is to add your own `TomcatEmbeddedServletContainerFactory`.
@ -1050,7 +1050,7 @@ configuration properties. The most common options to set are:
(Because of relaxed data binding hyphens or underscores should work equally well as
property keys.) The `ddl-auto` setting is a special case in that it has different
defaults depending on whether you are using an embedded database (`create-drop`) or not
(`none`). In addition all properties in `spring.jpa.properties.*` are passed through as
(`none`). In addition all properties in `+spring.jpa.properties.*+` are passed through as
normal JPA properties (with the prefix stripped) when the local `EntityManagerFactory` is
created.
@ -1133,10 +1133,10 @@ Spring Data JPA and Spring Data Mongo can both create `Repository` implementatio
automatically. If they are both present on the classpath, you might have to do some extra
configuration to tell Spring Boot which one (or both) you want to create repositories for
you. The most explicit way to do that is to use the standard Spring Data
`@Enable*Repositories` and tell it the location of your `Repository` interfaces
`+@Enable*Repositories+` and tell it the location of your `Repository` interfaces
(where '`*`' is '`Jpa`' or '`Mongo`' or both).
There are also flags `spring.data.*.repositories.enabled` that you can use to switch the
There are also flags `+spring.data.*.repositories.enabled+` that you can use to switch the
auto-configured repositories on and off in external configuration. This is useful for
instance in case you want to switch off the Mongo repositories and still use the
auto-configured `MongoTemplate`.
@ -1346,7 +1346,7 @@ how to register handlers in the servlet container.
=== Switch off the Spring Boot security configuration
If you define a `@Configuration` with `@EnableWebSecurity` anywhere in your application
it will switch off the default webapp security settings in Spring Boot. To tweak the
defaults try setting properties in `security.*` (see
defaults try setting properties in `+security.*+` (see
{sc-spring-boot-autoconfigure}/security/SecurityProperties.{sc-ext}[`SecurityProperties`]
for details of available settings) and `SECURITY` section of
<<common-application-properties-security,Common application properties>>.

View File

@ -184,7 +184,7 @@ implementations. To configure the severity or order add the following to your ap
[[production-ready-application-info]]
=== Custom application info information
You can customize the data exposed by the `info` endpoint by setting `info.*` Spring
You can customize the data exposed by the `info` endpoint by setting `+info.*+` Spring
properties. All `Environment` properties under the info key will be automatically
exposed. For example, you could add the following to your `application.properties`:
@ -234,7 +234,7 @@ You can then refer to your Maven '`project properties`' via placeholders, e.g.
info.build.version=${project.version}
----
NOTE: In the above example we used `project.*` to set some values to be used as
NOTE: In the above example we used `+project.*+` to set some values to be used as
fallbacks if the Maven resource filtering has not been switched on for some reason.
@ -554,8 +554,8 @@ The remote shell can be extended in a number of interesting ways.
You can write additional shell commands using Groovy or Java (see the CRaSH documentation
for details). By default Spring Boot will search for commands in the following locations:
* `classpath*:/commands/**`
* `classpath*:/crash/commands/**`
* `+classpath*:/commands/**+`
* `+classpath*:/crash/commands/**+`
TIP: You can change the search path by settings a `shell.commandPathPatterns` property.
@ -651,7 +651,7 @@ Here we can see basic `memory`, `heap`, `class loading`, `processor` and `thread
information along with some HTTP metrics. In this instance the `root` ('`/`') and `/metrics`
URLs have returned `HTTP 200` responses `20` and `3` times respectively. It also appears
that the `root` URL returned `HTTP 401` (unauthorized) `4` times. The double asterix (`star-star`)
comes from a request matched by Spring MVC as `/**` (normally a static resource).
comes from a request matched by Spring MVC as `+/**+` (normally a static resource).
The `gauge` shows the last response time for a request. So the last request to `root` took
`2ms` to respond and the last to `/metrics` took `3ms`.
@ -729,7 +729,7 @@ a dependency to the `com.codahale.metrics:metrics-core` library; you can also re
own `@Bean` instance if you need customizations.
Users can create Coda Hale metrics by prefixing their metric names with the appropriate
type (e.g. `histogram.\*`, `meter.\*`).
type (e.g. `+histogram.*+`, `+meter.*+`).

View File

@ -206,7 +206,7 @@ sensible overriding of values, properties are considered in the the following or
. Java System properties (`System.getProperties()`).
. OS environment variables.
. JNDI attributes from `java:comp/env`
. A `RandomValuePropertySource` that only has properties in `random.*`.
. A `RandomValuePropertySource` that only has properties in `+random.*+`.
. Application properties outside of your packaged jar (`application.properties`
including YAML and profile variants).
. Application properties packaged inside your jar (`application.properties`
@ -250,7 +250,7 @@ or test cases). It can produce integers, longs or strings, e.g.
my.number.in.range=${random.int[1024,65536]}
----
The `random.int*` syntax is `OPEN value (,max) CLOSE` where the `OPEN,CLOSE` are any
The `+random.int*+` syntax is `OPEN value (,max) CLOSE` where the `OPEN,CLOSE` are any
character and `value,max` are integers. If `max` is provided then `value` is the minimum
value and `max` is the maximum (exclusive).
@ -737,7 +737,7 @@ As with console output, `ERROR`, `WARN` and `INFO` level messages are logged by
=== Log Levels
All the supported logging systems can have the logger levels set in the Spring
`Environment` (so for example in `application.properties`) using '`logging.level.*=LEVEL`'
`Environment` (so for example in `application.properties`) using '`+logging.level.*=LEVEL+`'
where '`LEVEL`' is one of TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. Example
`application.properties`:
@ -929,7 +929,7 @@ the default MVC configuration) because Spring will always be able to handle requ
through the `DispatcherServlet`.
In addition to the '`standard`' static resource locations above, a special case is made for
http://www.webjars.org/[Webjars content]. Any resources with a path in `/webjars/**` will
http://www.webjars.org/[Webjars content]. Any resources with a path in `+/webjars/**+` will
be served from jar files if they are packaged in the Webjars format.
TIP: Do not use the `src/main/webapp` folder if your application will be packaged as a
@ -1045,7 +1045,7 @@ your `application.properties` during configuration.
By default, if the context contains only a single Servlet it will be mapped to `/`. In
the case of multiple Servlets beans the bean name will be used as a path prefix. Filters
will map to `/*`.
will map to `+/*+`.
If convention-based mapping is not flexible enough you can use the
`ServletRegistrationBean` and `FilterRegistrationBean` classes for complete control. You
@ -1186,8 +1186,8 @@ The basic features you get out of the box in a web application are:
* An `AuthenticationManager` bean with in-memory store and a single user (see
`SecurityProperties.User` for the properties of the user).
* Ignored (unsecure) paths for common static resource locations (`/css/\*\*`, `/js/\*\*`,
`/images/\*\*` and `\*\*/favicon.ico`).
* Ignored (unsecure) paths for common static resource locations (`+/css/**+`, `+/js/**+`,
`+/images/**+` and `+**/favicon.ico+`).
* HTTP Basic security for all other endpoints.
* Security events published to Spring's `ApplicationEventPublisher` (successful and
unsuccessful authentication and access denied).
@ -1195,7 +1195,7 @@ The basic features you get out of the box in a web application are:
on by default.
All of the above can be switched on and off or modified using external properties
(`security.*`). To override the access rules without changing any other autoconfigured
(`+security.*+`). To override the access rules without changing any other autoconfigured
features add a `@Bean` of type `WebConfigurerAdapter` with
`@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)`.
@ -1206,7 +1206,7 @@ If the Actuator is also in use, you will find:
* The default user will have the `ADMIN` role as well as the `USER` role.
The Actuator security features can be modified using external properties
(`management.security.*`). To override the application access rules
(`+management.security.*+`). To override the application access rules
add a `@Bean` of type `WebConfigurerAdapter` and use
`@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)` if you _don't_ want to override
the actuator access rules, or `@Order(ManagementServerProperties.ACCESS_OVERRIDE_ORDER)`
@ -1285,7 +1285,7 @@ NOTE: Additional connection pools can always be configured manually. If you defi
own `DataSource` bean, auto-configuration will not occur.
DataSource configuration is controlled by external configuration properties in
`spring.datasource.*`. For example, you might declare the following section
`+spring.datasource.*+`. For example, you might declare the following section
in `application.properties`:
[source,properties,indent=0]
@ -1452,7 +1452,7 @@ their http://projects.spring.io/spring-data-jpa/[reference documentation].
==== Creating and dropping JPA databases
By default JPA database will be automatically created *only* if you use an embedded
database (H2, HSQL or Derby). You can explicitly configure JPA settings using
`spring.jpa.*` properties. For example, to create and drop tables you can add the
`+spring.jpa.*+` properties. For example, to create and drop tables you can add the
following to your `application.properties`.
[indent=0]
@ -1462,7 +1462,7 @@ following to your `application.properties`.
NOTE: Hibernate's own internal property name for this (if you happen to remember it
better) is `hibernate.hbm2ddl.auto`. You can set it, along with other Hibernate native
properties, using `spring.jpa.properties.*` (the prefix is stripped before adding them
properties, using `+spring.jpa.properties.*+` (the prefix is stripped before adding them
to the entity manager). Example:
[indent=0]
@ -1815,7 +1815,7 @@ to integrate with JMS. Adding `org.hornetq:hornetq-jms-server` to your applicati
you to use the embedded mode.
HornetQ configuration is controlled by external configuration properties in
`spring.hornetq.*`. For example, you might declare the following section in
`+spring.hornetq.*+`. For example, you might declare the following section in
`application.properties`:
[source,properties,indent=0]
@ -1848,7 +1848,7 @@ available on the classpath. If the broker is present, an embedded broker is star
configured automatically (as long as no broker URL is specified through configuration).
ActiveMQ configuration is controlled by external configuration properties in
`spring.activemq.*`. For example, you might declare the following section in
`+spring.activemq.*+`. For example, you might declare the following section in
`application.properties`:
[source,properties,indent=0]

View File

@ -199,7 +199,7 @@ running quickly and with a consistent, supported set of managed transitive depen
.What's in a name
****
All starters follow a similar naming pattern; `spring-boot-starter-\*`, where `*` is
All starters follow a similar naming pattern; `+spring-boot-starter-*+`, where `+*+` is
a particular type of application. This naming structure is intended to help when you need
to find a starter. The Maven integration in many IDEs allow you to search dependencies by
name. For example, with the appropriate Eclipse or STS plugin installed, you can simply
@ -424,7 +424,7 @@ is also a good candidate as the primary `@Configuration`.
TIP: Many Spring configuration examples have been published on the Internet that use XML
configuration. Always try to use the equivalent Java-base configuration if possible.
Searching for `enable*` annotations can be a good starting point.
Searching for `+enable*+` annotations can be a good starting point.