Polish
This commit is contained in:
@@ -232,6 +232,8 @@ example:
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
|
||||
[[build-tool-plugins-gradle-custom-version-management]]
|
||||
==== Custom version management
|
||||
If is possible to customize the versions used by the `ResolutionStrategy` if you need
|
||||
@@ -257,6 +259,8 @@ the above example `mycorp-versions.properties` file might contain the following:
|
||||
The properties file takes precedence over Spring Boot's defaults, and can be used
|
||||
to override version numbers if necessary.
|
||||
|
||||
|
||||
|
||||
[[build-tool-plugins-gradle-packaging]]
|
||||
=== Packaging executable jar and war files
|
||||
Once the `spring-boot` plugin has been applied to your project it will automatically
|
||||
|
||||
@@ -788,12 +788,10 @@ added.
|
||||
(defaults are both empty, but accessible for external configuration via
|
||||
`spring.view.prefix` and `spring.view.suffix`). It can be overridden by providing a
|
||||
bean of the same type.
|
||||
|
||||
* A `BeanNameViewResolver` with id ``beanNameViewResolver''. This is a useful member of the
|
||||
view resolver chain and will pick up any beans with the same name as the `View` being
|
||||
resolved. It can be overridden by providing a bean of the same type, but it's unlikely
|
||||
you will need to do that.
|
||||
|
||||
* A `ContentNegotiatingViewResolver` with id ``viewResolver'' is only added if there *are*
|
||||
actually beans of type `View` present. This is a ``master'' resolver, delegating to all
|
||||
the others and attempting to find a match to the ``Accept'' HTTP header sent by the
|
||||
@@ -802,28 +800,23 @@ added.
|
||||
that you might like to study to learn more, and also look at the source code for detail.
|
||||
You can switch off the auto-configured
|
||||
`ContentNegotiatingViewResolver` by defining a bean named ``viewResolver''.
|
||||
|
||||
* If you use Thymeleaf you will also have a `ThymeleafViewResolver` with id
|
||||
``thymeleafViewResolver''. It looks for resources by surrounding the view name with a
|
||||
prefix and suffix (externalized to `spring.thymeleaf.prefix` and
|
||||
`spring.thymeleaf.suffix`, defaults ``classpath:/templates/'' and ``.html''
|
||||
respectively). It can be overridden by providing a bean of the same name.
|
||||
|
||||
* If you use FreeMarker you will also have a `FreeMarkerViewResolver` with id
|
||||
``freeMarkerViewResolver''. It looks for resources in a loader path (externalized to
|
||||
`spring.freemarker.templateLoaderPath`, default ``classpath:/templates/'') by
|
||||
surrounding the view name with a prefix and suffix (externalized to `spring.freemarker.prefix`
|
||||
and `spring.freemarker.suffix`, with empty and ``.ftl'' defaults respectively). It can be overriden
|
||||
by providing a bean of the same name.
|
||||
|
||||
and `spring.freemarker.suffix`, with empty and ``.ftl'' defaults respectively). It can
|
||||
be overridden by providing a bean of the same name.
|
||||
* If you use Groovy templates (actually if groovy-templates is on your classpath) you will
|
||||
also have a `Groovy TemplateViewResolver` with id
|
||||
``groovyTemplateViewResolver''. It looks for resources in a loader path by
|
||||
surrounding the view name with a prefix and suffix (externalized to
|
||||
`spring.groovy.template.prefix` and `spring.groovy.template.suffix`, defaults
|
||||
``classpath:/templates/'' and ``.tpl'' respectively). It can be overriden by providing a bean of
|
||||
the same name.
|
||||
|
||||
also have a `Groovy TemplateViewResolver` with id ``groovyTemplateViewResolver''. It
|
||||
looks for resources in a loader path by surrounding the view name with a prefix and
|
||||
suffix (externalized to `spring.groovy.template.prefix` and
|
||||
`spring.groovy.template.suffix`, defaults ``classpath:/templates/'' and ``.tpl''
|
||||
respectively). It can be overriden by providing a bean of the same name.
|
||||
* If you use Velocity you will also have a `VelocityViewResolver` with id ``velocityViewResolver''.
|
||||
It looks for resources in a loader path (externalized to `spring.velocity.resourceLoaderPath`,
|
||||
default ``classpath:/templates/'') by surrounding the view name with a prefix and suffix
|
||||
@@ -831,7 +824,7 @@ added.
|
||||
defaults respectively). It can be overridden by providing a bean of the same name.
|
||||
|
||||
Check out {sc-spring-boot-autoconfigure}/web/WebMvcAutoConfiguration.{sc-ext}[`WebMvcAutoConfiguration`],
|
||||
{sc-spring-boot-autoconfigure}/thymeleaf/ThymeleafAutoConfiguration.{sc-ext}[`ThymeleafAutoConfiguration`],
|
||||
{sc-spring-boot-autoconfigure}/thymeleaf/ThymeleafAutoConfiguration.{sc-ext}[`ThymeleafAutoConfiguration`],
|
||||
{sc-spring-boot-autoconfigure}/freemarker/FreeMarkerAutoConfiguration.{sc-ext}[`FreeMarkerAutoConfiguration`],
|
||||
{sc-spring-boot-autoconfigure}/groovy/template/GroovyTemplateAutoConfiguration.{sc-ext}[`GroovyTemplateAutoConfiguration`] and
|
||||
{sc-spring-boot-autoconfigure}/velocity/VelocityAutoConfiguration.{sc-ext}[`VelocityAutoConfiguration`]
|
||||
@@ -1400,6 +1393,7 @@ If you are using Thymeleaf, then set `spring.thymeleaf.cache` to `false`. See
|
||||
for other Thymeleaf customization options.
|
||||
|
||||
|
||||
|
||||
[[howto-reload-freemarker-content]]
|
||||
=== Reload FreeMarker templates without restarting the container
|
||||
If you are using FreeMarker, then set `spring.freemarker.cache` to `false`. See
|
||||
@@ -1407,6 +1401,7 @@ If you are using FreeMarker, then set `spring.freemarker.cache` to `false`. See
|
||||
for other FreeMarker customization options.
|
||||
|
||||
|
||||
|
||||
[[howto-reload-groovy-template-content]]
|
||||
=== Reload Groovy templates without restarting the container
|
||||
If you are using Groovy templates, then set `spring.groovy.template.cache` to `false`. See
|
||||
@@ -1414,6 +1409,7 @@ If you are using Groovy templates, then set `spring.groovy.template.cache` to `f
|
||||
for other Groovy customization options.
|
||||
|
||||
|
||||
|
||||
[[howto-reload-velocity-content]]
|
||||
=== Reload Velocity templates without restarting the container
|
||||
If you are using Velocity, then set `spring.velocity.cache` to `false`. See
|
||||
@@ -1421,6 +1417,7 @@ If you are using Velocity, then set `spring.velocity.cache` to `false`. See
|
||||
for other Velocity customization options.
|
||||
|
||||
|
||||
|
||||
[[howto-reload-java-classes-without-restarting]]
|
||||
=== Reload Java classes without restarting the container
|
||||
Modern IDEs (Eclipse, IDEA, etc.) all support hot swapping of bytecode, so if you make a
|
||||
|
||||
@@ -906,16 +906,16 @@ and it will be silently ignored by most build tools if you generate a jar.
|
||||
[[boot-features-spring-mvc-template-engines]]
|
||||
==== Template engines
|
||||
|
||||
As well as REST web services, you can also use Spring MVC to serve dynamic HTML content. Spring
|
||||
MVC supports a variety of templating technologies including Velocity, FreeMarker and JSPs. Many
|
||||
other templating engines also ship their own Spring MVC integrations.
|
||||
As well as REST web services, you can also use Spring MVC to serve dynamic HTML content.
|
||||
Spring MVC supports a variety of templating technologies including Velocity, FreeMarker
|
||||
and JSPs. Many other templating engines also ship their own Spring MVC integrations.
|
||||
|
||||
Spring Boot includes auto-configuration support for the following templating engines:
|
||||
|
||||
- http://freemarker.org/docs/[FreeMarker]
|
||||
- http://beta.groovy-lang.org/docs/groovy-2.3.0/html/documentation/markup-template-engine.html[Groovy]
|
||||
- http://www.thymeleaf.org[Thymeleaf]
|
||||
- http://velocity.apache.org[Velocity]
|
||||
* http://freemarker.org/docs/[FreeMarker]
|
||||
* http://beta.groovy-lang.org/docs/groovy-2.3.0/html/documentation/markup-template-engine.html[Groovy]
|
||||
* http://www.thymeleaf.org[Thymeleaf]
|
||||
* http://velocity.apache.org[Velocity]
|
||||
|
||||
When you're using one of these templating engines with the default configuration, your templates
|
||||
will be picked up automatically from `src/main/resources/templates`.
|
||||
@@ -1131,8 +1131,8 @@ 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
|
||||
features add a `@Bean` of type `WebConfigurerAdapter` with
|
||||
(`security.*`). To override the access rules without changing any other autoconfigured
|
||||
features add a `@Bean` of type `WebConfigurerAdapter` with
|
||||
`@Order(SecurityProperties.ACCESS_OVERRIDE_ORDER)`.
|
||||
|
||||
If the Actuator is also in use, you will find:
|
||||
@@ -1142,10 +1142,10 @@ 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)`
|
||||
the actuator access rules, or `@Order(ManagementServerProperties.ACCESS_OVERRIDE_ORDER)`
|
||||
if you _do_ want to override the actuator access rules.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user