Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
19fa5b9a
Commit
19fa5b9a
authored
Nov 29, 2013
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated howtos
parent
d39fc5bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
howto.md
docs/howto.md
+37
-0
application.properties
...t-sample-web-ui/src/main/resources/application.properties
+1
-1
No files found.
docs/howto.md
View file @
19fa5b9a
...
@@ -43,8 +43,44 @@ Javadocs. Some rules of thumb:
...
@@ -43,8 +43,44 @@ Javadocs. Some rules of thumb:
## Configure Tomcat
## Configure Tomcat
Generally you can follow the advice
[
here
](
#discover.options
)
about
`@ConfigurationProperties`
(
`ServerProperties`
is the main one here),
but also look at
`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`
.
## Configure Jetty
## Configure Jetty
Generally you can follow the advice
[
here
](
#discover.options
)
about
`@ConfigurationProperties`
(
`ServerProperties`
is the main one here),
but also look at
`EmbeddedServletContainerCustomizer`
. The Jetty APIs
are quite rich so once you have access to the
`JettyEmbeddedServletContainerFactory`
you can modify it in a number
of ways. Or the nuclear option is to add your own
`JettyEmbeddedServletContainerFactory`
.
## Reload Static Content (E.g. Thymeleaf Templates) Without Restarting the Container
If you are using Thymeleaf, then set
`spring.thymeleaf.cache=false`
. See
`ThymeleafAutoConfiguration`
for
other template customization options.
# Reload Java Classes Without Restarting the Container
Modern IDEs (Eclipse, IDEA etc.) all support hot swapping of bytecode,
so if you make a change that doesn't affect class or method signatures
it should reload cleanly with no side effects.
[
Spring Loaded
](
https://github.com/spring-projects/spring-loaded
)
goes
a little further in that it can reload class definitions with changes
in the method signatures. With some customization it can force an
`ApplicationContext`
to refresh itself (but there is no general
mechanism to ensure that would be safe for a running application
anyway, so it would only ever be a development time trick probably).
<span
id=
"build.hierarchy"
/>
<span
id=
"build.hierarchy"
/>
## Build an ApplicationContext Hierarchy (Adding a Parent or Root Context)
## Build an ApplicationContext Hierarchy (Adding a Parent or Root Context)
...
@@ -325,6 +361,7 @@ to load an `ApplicationContext` via a `DispatcherServlet`.
...
@@ -325,6 +361,7 @@ to load an `ApplicationContext` via a `DispatcherServlet`.
TODO: add some detail.
TODO: add some detail.
<span
id=
"discover.options"
/>
## Discover Built-in Options for External Properties
## Discover Built-in Options for External Properties
Spring Boot binds external properties from
`application.properties`
Spring Boot binds external properties from
`application.properties`
...
...
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/application.properties
View file @
19fa5b9a
# Allow Thymeleaf templates to be reloaded at dev time
# Allow Thymeleaf templates to be reloaded at dev time
spring.t
emplate
.cache
:
false
spring.t
hymeleaf
.cache
:
false
server.tomcat.access_log_enabled
:
true
server.tomcat.access_log_enabled
:
true
server.tomcat.basedir
:
target/tomcat
server.tomcat.basedir
:
target/tomcat
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment