Commit Graph

323 Commits

Author SHA1 Message Date
Dave Syer 0effd7f58e Use security starter in CLI autocompile
[Fixes #53777677] [bs-244]
2013-07-22 12:21:05 +01:00
Dave Syer 01ebd6da08 Fix CLI script 2013-07-22 12:06:35 +01:00
Dave Syer 5d4f075011 Fix markdown rendering of bullets on homepage 2013-07-21 08:04:20 +01:00
Dave Syer 944fd4f4b8 Enhance some docs and add content to READMEs 2013-07-19 17:36:22 +01:00
Dave Syer 90c942387f Add basic READMEs 2013-07-19 17:36:22 +01:00
Phillip Webb 8fdfe245ca Add tests for session timeouts
Add unit tests for session timeouts and also added a convenience method
to set the time with a TimeUnit.

Issue: #53667353
2013-07-19 09:19:59 -07:00
Phillip Webb 100edf9a4b Remove getters from ConfEmbServletContainerFactory
Only provide setters on the ConfigurableEmbeddedServletContainerFactory
interface.
2013-07-19 08:57:21 -07:00
Phillip Webb adbbc35944 Reduce logging level for non-critical warning 2013-07-19 08:50:15 -07:00
Phillip Webb b824d6309a Hide hibernate validator version INFO logging 2013-07-19 08:50:15 -07:00
Phillip Webb a885afb818 Switch jetty & tomcat samples to use starter POMs 2013-07-19 08:50:14 -07:00
Phillip Webb 1eca022073 Add JSP-API to tomcat starter
Add JSP API jar dependency to tomcat starter. Primarily to prevent
log warnings.
2013-07-19 08:50:14 -07:00
Dave Syer ea3d2e74dd Add sessionTimeout to embedded servlet containers
* ConfigurableEmbeddedServletContainerFactory now has a sessionTimeout
property
* The ServerProperties in Actuator supports it

[Fixes #53667353] [bs-243] Support setSessionTimeout
2013-07-19 09:37:35 +01:00
Phillip Webb 1b780beddd Support mime type extension mappings
Add MimeMappings class to encapsulate mappings between file extensions
and mime types.

Issue: #51754753
2013-07-18 15:54:56 -07:00
Dave Syer 4469f36975 Format thread ID to be fixed width
...instead of...
[#53530203] [bs-237] Put [thread] at end of log line
2013-07-18 21:51:30 +01:00
Dave Syer c84462b3d8 Remove unfixable FIXME 2013-07-18 21:50:45 +01:00
Phillip Webb 9ce3428597 Add EmbeddedServletContainer.start() method
Add EmbeddedServletContainer.start() method that is used to start the
embedded servlet container once the application context has finished
being refreshed.

Refactored existing EmbeddedServletContainerFactory implementations to
no longer keep server instances locally.

Issue: #53538787
2013-07-18 11:38:25 -07:00
Phillip Webb 5c11d273cc Remove seemingly unused ManagementServerConfig.. 2013-07-18 11:28:02 -07:00
Phillip Webb facbbd4c93 Remove unnecessary TODO from SimpleJsonParser 2013-07-18 10:18:59 -07:00
Dave Syer fff2a804bc Add springcli.properties for version labels
[Fixes #53030591] [bs-191] Use filtering in maven build
2013-07-18 16:33:12 +01:00
Dave Syer c055cf063d Starter pom gets spring.zero.version as a property
We are using a resource filter to generate that pom, so it will change
when the version changes.  I prefer on balance leaving the generated
code in git in a place where it will be useful in a clean clone.

[Fixes #53189241] [bs-227]
2013-07-18 14:49:18 +01:00
Dave Syer 6fd6afc7a3 Upgrade Spring Security to 3.2.0
Existing users should update their dependencies to
spring-security-config instead of *-javaconfig.

[Fixes #53472823] [bs-234]
2013-07-18 13:36:56 +01:00
Dave Syer 4fe6b41ffe Merge manifest in maven-plugin
[Fixes #53530489] [bs-236]
2013-07-18 12:49:20 +01:00
Dave Syer ffa70f7c7e [bs-239] Race condition in embedded container contexts
I'll mark this as fixing the bug in tracker, but it might benefit
from some re-working at some point. The basic idea is to use
our old friend ContextRefreshedEvent to start the server listening
for connections. Delaying and making public the start() method from the
EmbeddedServletContainer doesn't help because you need the server to
start in order to get a ServletContext for Spring.

[Fixes #53538787]
2013-07-18 11:29:00 +01:00
Dave Syer 519d81cfdb Add some generally useful stuff to starter parent 2013-07-18 09:16:36 +01:00
Dave Syer e8dfb7368f Change trad sample to use tomcat starter 2013-07-18 08:47:42 +01:00
Phillip Webb 50109d4ace Set PID early for logging
Set PID early in the initialization process to ensure log enties are
not written without an ID.
2013-07-17 23:25:24 -07:00
Phillip Webb 1bec676ca1 Add 'run' goal to spring-package-maven-plugin
Add a 'run' goal that allows maven to run a bootstrap packaged
application in-place. Similar to the maven-exec-plugin but also
adds src/main/resources to the classpath, allowing 'instant refresh'
for web developers.

Issue: #53592789
2013-07-17 23:20:41 -07:00
Dave Syer 7dd186aa40 Use enum for parent context modes in @ConditionalOnBean
@ConditionOn*Bean now have search=ALL by default (CURRENT and
PARENTS also supported).

[Fixes #53538357]
2013-07-17 12:25:54 +01:00
Dave Syer b02be6e6ec Thymeleaf dialects now handled as @Autowired collection
This fixed the immediate problem with Thymeleaf, but leaves open
the question of how we can prevent other race conditions developing.
As long as the container can start handling requests before the Spring
context is refreshed this will be a source of bugs.

[Fixes #53482411] [bs-235] Race condition in Thymeleaf
2013-07-17 12:00:58 +01:00
Dave Syer 4de64c7f6b [bs-229] Switch to logback in starter POM
The spring-starter-logging is included everywhere transitively
now so logback is the default. The actuator sample explicitly
excludes the logging starter so it can have profiles for
different loggers (just as a demo).

[Fixes #53278727]
2013-07-17 09:43:22 +01:00
Dave Syer e2ae839594 [Fixes #53388895] [bs-233] Remove structure 101 files 2013-07-17 09:24:35 +01:00
Phillip Webb fd62eab23a Polish maven plugin 2013-07-17 01:12:21 -07:00
Phillip Webb 521608fda3 Extract CLI parsing from config file initializer
Extract command line property parsing logic from the
ConfigFileApplicationContextInitializer and instead perform it as part
of the SpringApplication initialization. This allows SpringApplications
that do not use the ConfigFileApplicationContextInitializer to still
expose command line arguments as property sources.

SpringApplicationInitializers may now implement EnvironmentAware if
they need access to the environment during early initialization.

This commit also removes the custom command line parsing logic that
was temporarily added to work around SPR-10579 which has since been
fixed upstream.
2013-07-17 00:23:25 -07:00
Dave Syer cc926dac0c Add dist mgt to starter parent 2013-07-16 17:26:38 +01:00
Dave Syer f0d5b8bbe3 [bs-153] Don't expose classes as resource
Made classpath:/[static,resourecs,public] available instead. Some
sample apps had to change so probably some gs-* guides etc as well?

[Fixes #51368907]
2013-07-16 15:30:26 +01:00
Dave Syer 6c3fd2b2d0 [bs-232] Use "jar" packaging instead of custom "executable-jar"
[Fixes #53376257]
2013-07-16 14:38:24 +01:00
Dave Syer 4ce6b64dce [bs-175] Generic dispatcher features for SpringApplication
* Move Spring.main into SpringApplication.main
* User can bind command line or application.properties into
SpringApplication
* User can provide sources dynamically with --spring.main.sources
(a CSV list of class names, package names or XML resource locations)
* One side effect was to make DocumentMatchers stateless

[#52830829]
2013-07-16 10:45:36 +01:00
Dave Syer d75c1e4956 Speed up CLI tests if jar is cached locally 2013-07-16 10:23:14 +01:00
Dave Syer eba5b74910 Remember to add interceptor to registry 2013-07-15 17:22:10 +01:00
Dave Syer f52d624be5 Add option in @OnBeanCondition to *only* look in parent
[Fixes #53374039] [bs-231] Broken tests for management port configuration
2013-07-15 11:16:02 +01:00
Dave Syer 789e75d2e5 [bs-170] Out of the box support for thymeleaf security dialect
[Fixes #52121649]
2013-07-15 09:59:14 +01:00
Phillip Webb 14aa163731 Start to breakup README.md documentation 2013-07-14 20:50:44 -07:00
Phillip Webb 30bf5dcb0d Do not using static finals for PID and format
Update SimpleFormatter so that the PID and format can be different per
formatter instance.
2013-07-14 06:55:15 -07:00
Dave Syer 217a6a4cd1 Unify log format of default JDK logger with other systems 2013-07-14 08:58:47 +01:00
Phillip Webb a97f4f670c Tweak starter poms
Minor tweaks to some starter POMs.
2013-07-13 22:46:45 -07:00
Phillip Webb 8d39abb8d9 Protect against multiple define package calls
Ensure that multiple calls to define package are not made when the
same class is contained in multiple jars.
2013-07-13 22:44:27 -07:00
Phillip Webb dc1b787a01 Support color log output
Rework logback formatting to include ansi color output. Also added
support for JUL over SLF4J to ensure that tomcat logging looks OK.

Issue: #53249833
2013-07-13 21:05:07 -07:00
Phillip Webb 5c46a39494 Polish ANSI code 2013-07-13 16:05:56 -07:00
Phillip Webb a324beadac Create LoggingSystem class to configure logging
Add LoggingSystem class that can be used to configure various logging
systems in a consistent way. Mostly the code is migrated from the
LoggingApplicationContextInitializer.
2013-07-13 16:04:08 -07:00
Phillip Webb ae20d389c4 Add SpringApplicationInitializer strategy
Add SpringApplicationInitializer that can be used to initialize a
SpringApplication before it runs. An ApplicationContextInitializer
can optionally implement this interface.
2013-07-13 16:04:07 -07:00