1304 Commits

Author SHA1 Message Date
Dave Syer
cd54e1ed49 Add some more howtos 2013-11-26 18:00:50 +00:00
Dave Syer
94e2f90793 Ensure endpoints.jolokia.enabled=false switches off jolokia 2013-11-26 13:27:10 +00:00
Dave Syer
564475556e Allow for commandLineArgs to be already present in Environment 2013-11-26 10:00:50 +00:00
Dave Syer
3f1cfbf241 Add JSTL to JSP sample 2013-11-26 10:00:50 +00:00
Phillip Webb
f4f668a52b Polish 2013-11-25 17:12:56 -08:00
Phillip Webb
c5911e8634 Attempt to restore Javadoc 2013-11-25 16:31:46 -08:00
Phillip Webb
8845c9c279 Fixup for upstream Spring changes 2013-11-25 16:25:03 -08:00
Dave Syer
29293a1ae5 Maybe not 2.9.1 2013-11-25 18:20:36 +00:00
Dave Syer
c113e37f65 Javadoc 2.9.1 seems to be broken 2013-11-25 18:09:28 +00:00
Dave Syer
cb38abff41 Add starter for howto.md 2013-11-25 17:28:51 +00:00
Dave Syer
aed0e0f217 Add provided scope for tomcat 2013-11-25 17:22:14 +00:00
Dave Syer
a9e4400f82 Add test for PropertyPlaceholderAutoConfiguration 2013-11-25 16:07:07 +00:00
Dave Syer
aeb0f0a625 Add random.* property source 2013-11-25 15:08:53 +00:00
Dave Syer
94c5203de6 Add more smarts to properties binding
* Underscores are allowed as nested property field separators
* System and env vars are only considered for binding if they
look like they apply to a given bean when ignoreUnknownFields
is false
2013-11-25 15:08:53 +00:00
Christian Dupuis
04b7b9b2ca Rework handling of default shell authentication method in the absence of Spring Security
In case Spring Security is missing from the class path, shell auto configuration will now fall back gracefully to simple authentication and emit warning to the console.

fixes #114
2013-11-25 16:07:58 +01:00
Christian Dupuis
d828f13a09 Fix exec-maven-plugin configuration issue
fixes #133
2013-11-25 15:18:34 +01:00
Christian Dupuis
e06596ada8 Merge pull request #132 from nitram509/fix-exception-msg-typos
fixed typos in Exception messages
2013-11-25 02:25:17 -08:00
Dave Syer
98ae4ed928 Add ignoreNestedFields option to @ConfigurationProperties
@ConfigurationProperties(ignoreUnkownFields=false,ignoreNestedFields=true)
is now a useful option for binding to "top-level" command line options
(without a prefix). In that case we don't try to bind to `server.*` and
other common prefixed property values (at the cost of not being able to
bind to nested beans).
2013-11-25 09:15:09 +00:00
Dave Syer
d8033189d0 Disable javdoc until it can be fixed 2013-11-24 14:01:26 +00:00
nitram509
cbc9c6a156 fixed 3 x typos in Exception messages 2013-11-24 13:40:50 +01:00
Dave Syer
8efa2fc569 Use server.port=0 for scanning
This leverages existing capabilities of teh JDK and the OS
to grab a port at random and not have it stolen by another
process. It's very hard to avoid that race condition in
pure Java code, so why bother?

User can set port<0 to disable autoStart of connectors (e.g.
to start a web application context but not have it listen on
any port). In that case the actual socket port will be set to
0 (and therefore if it ever starts up the local port will
be random).
2013-11-23 11:26:58 +00:00
Dave Syer
59f07d37ab Scan for port near default 2013-11-22 19:59:19 +00:00
Christian Dupuis
e69e190ae9 Close application context in test 2013-11-22 20:37:58 +01:00
Christian Dupuis
1b49605749 Make shell username and password configuration properties consistent with general security properties
Now simple authentication for the crsh shell can we configured using shell.auth.simple.user.name and shell.auth.simple.user.password. This is consistent with security.user.name and security.user.password.

fixes #113
2013-11-22 20:37:37 +01:00
Christian Dupuis
86334403ed Add Jolokia to spring-boot-dependencies 2013-11-22 18:07:14 +01:00
Christian Dupuis
2d058570ca Add auto configure support for Jolokia a JMX-HTTP bridge 2013-11-22 18:07:14 +01:00
Christian Dupuis
b14c607d36 Add missing tests 2013-11-22 18:07:14 +01:00
Christian Dupuis
405c9d5593 Allow management endpoints to express what http methods they support
Previously a management endpoint was either GET or POST. That requirement seems limited.
2013-11-22 18:07:14 +01:00
Christian Dupuis
845aeecbad Properly close application context in tests 2013-11-22 18:07:14 +01:00
Christian Dupuis
cd89691726 Pin order to of crsh auto configuration to happen after any security related configuration
If crsh auto configuration happens too early a AuthenticationManager contributed by SecurityAutoConfiguration will not be detected
2013-11-22 18:07:13 +01:00
Dave Syer
61dd7d1dbb Add port scan to ServerProperties (server.scan=true)
Also moved ServerProperties to autoconfigure project.
2013-11-22 16:56:43 +00:00
Dave Syer
d6593fbee6 Add extra test for partial overrides 2013-11-22 08:51:02 +00:00
Dave Syer
bd26b28aa5 Extract actuator security into separate classes
So spring-security + a web app is secure by default
(you don't need the actuator).
2013-11-21 16:47:29 +00:00
Dave Syer
285dd5b270 ApplicationContextInitializers now listen for ContextRefreshedEvent
The AutoConfigurationReportLoggingInitializer wasn't working in
non-GenericApplicationContext becasue teh BeanFatcory wasn't available
for registering its listener during initialization. Instead of
relying on that rather fragile state I decided to give any
ApplicationContextInitializer that was itself an ApplicationListener
an explicit callback with a ContextRefreshedEvent, and move that
interface up a level in the logging initializer. Works much better.
2013-11-21 09:35:00 +00:00
Christian Dupuis
f3a225f35f Polish and rework default authentication method if a Spring Security AuthenticationManager is available
In case a Spring Security AuthenticationManager is found in the app context the auto configuration will change default shell authentication method to auth against Spring Security. In addition shell access will get protected by the specific role configured in SecurityProperties.Management.

Certainly this can be overridden by providing shell.auth and shell.auth.spring.roles.
2013-11-20 17:15:45 +01:00
Christian Dupuis
43c0c932e6 Ensure telnet connector gets installed if available on the class path 2013-11-20 17:15:45 +01:00
Christian Dupuis
95e68bf1a2 Prepare actuator sample to show how to use the telnet connector 2013-11-20 17:15:45 +01:00
Dave Syer
8127695240 Add META-INF/spring.provides to starters 2013-11-20 16:14:05 +00:00
Dave Syer
40b787c71a Add test for allowed/disallowed fields 2013-11-20 15:59:46 +00:00
Dave Syer
63f8b63f7e Upgrade Tomcat to 7.0.47 2013-11-20 12:21:21 +00:00
Dave Syer
c0bcb5e8e9 Add layout=NONE to packaging tools 2013-11-20 12:08:40 +00:00
Dave Syer
06c16ae452 Only check for singleton in AutoConfigurationReportLoggingInitializer
Using containsBean() involves looking in the parent bean factory
if there is one, and that would mean that the same report woykd be used
for multiple contexts, which wouldn't make sense.
2013-11-20 11:42:32 +00:00
Dave Syer
faf02a21ab Prevent @Bean method from being called during @PreDestroy 2013-11-20 11:19:54 +00:00
Dave Syer
6d4d495003 Tweak ApplicationContext ID
VCAP environemt applied consistently, and more tests.

[Fixes #60750138] [bs-351] Add API for application context id
2013-11-20 10:55:14 +00:00
Dave Syer
89332e230e Speed up grab command test
The autoconfiguration transformations (and loads of grabs
of spring-boot snapshots) were making the grab command
tests run really slowly. Snapshots are particularly bad.

Fixed by adding a --autoconfigure=false option to the
compiler configuration and using it in that test.
2013-11-20 09:58:09 +00:00
Dave Syer
fce48c00c7 Really fix it 2013-11-20 09:10:25 +00:00
Dave Syer
71cd1926b9 Fix test on command line 2013-11-20 08:58:45 +00:00
Dave Syer
a7368fcd33 Move grab-sample to resources dir 2013-11-20 08:58:29 +00:00
Dave Syer
439f041354 Remove test resources from tests JAR 2013-11-20 08:41:10 +00:00
Andy Wilkinson
820f43d3bc Add grab command to collect script's dependencies
Previously, run --local could be used to collect a script's
dependencies in ./repository. However, with this mechanism it wasn't
possible to collect the dependencies without running the application.

This commit adds a new command, grab, that can be used to collect
a script's dependencies in ./repository without having to run it.
run is configured with ./repository as a location in which it can find
its dependencies so that the previously collected dependencies
can be used when subsequently running the app.

As part of this work RunCommand and TestCommand have been refactored
to use common code for their common options:

	--no-guess-imports
	--no-guess-dependencies
	--classpath

Previously, the declaration and handling of the options was duplicated
in the two classes. GrabCommand also has these three options and uses
the same common code.
2013-11-19 15:20:27 +00:00