Commit Graph

56230 Commits

Author SHA1 Message Date
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
nitram509 c50fe0733b TomcatEmbeddedServletContainer now fails fast, if there are exceptions during protocol handler startup (re-throw exception) 2013-11-19 13:35:06 +00:00
Dave Syer 371fa489ee Add missing starters to parent pom
Fixes gh-122
2013-11-19 13:29:31 +00:00
Dave Syer 156ef3f1a0 Weird build problem? 2013-11-19 09:16:37 +00:00
Dave Syer ded9020916 Allow Batch datbase initializer to be disabled 2013-11-19 09:03:43 +00:00
Dave Syer caffc28b4c Add test for initializers when child context created 2013-11-19 09:03:43 +00:00
Dave Syer 60f3dd9386 Be defensive about adding autoconfig report bean 2013-11-19 09:03:43 +00:00
Christian Dupuis 2e926601f2 Polish 2013-11-18 20:59:25 +01:00
Christian Dupuis dba8c01035 Polish 2013-11-18 20:09:58 +01:00
Christian Dupuis ec6a488a95 Upgrade to crash-1.3.0-beta11 2013-11-18 20:09:36 +01:00
Christian Dupuis e16e23230c Clarify default authentication settings for shell access 2013-11-18 17:48:21 +01:00
Christian Dupuis 41cbbeba79 Re-Introduce authentication specific properties 2013-11-18 17:42:50 +01:00
Christian Dupuis e009d3e47d Polish
Fixed inconsistency in method naming after last polish. Method and class name should use 'crsh' instead of 'crash' to be aligned with CRaSH code base.

Implemented facility to provide custom shell properties by adding beans of type CrshShellProperties to the ApplicationContext.
2013-11-18 17:20:45 +01:00
Christian Dupuis dc252c7417 Remove unnecessary String concatenation 2013-11-18 15:06:05 +01:00
Andy Wilkinson fd2583ed28 Support concise @Grab on all types of imports
Previously, the automatic addition of the group and version to a
@Grab annotation based on the module name would only work on standard
import statements. This commit adds support for this functionality
on wildcard imports, static imports and wildcard static imports.

All of the following are now supported:

@Grab('spring-core')
import org.springframework.util.Assert

@Grab('spring-core')
import org.springframework.util.*

@Grab('spring-core')
import static org.springframework.util.Assert.isTrue

@Grab('spring-core')
import static org.springframework.util.Assert.*
2013-11-18 12:40:57 +00:00
Dave Syer 640b9d2680 Add RedisAutoConfiguration 2013-11-18 10:54:33 +00:00
Dave Syer 71fd474ed2 Ensure ApplicationContextInitializers are not overwritten
SpringApplicationBuilder has to be careful not to overwrite the
default initializers if user calls its initializers() method.

Fixes gh-120.
2013-11-18 09:59:11 +00:00
Dave Syer 79495e7ad9 Add repository declaration to starter parent
Fixes gh-117.
2013-11-17 15:49:00 +00:00
Dave Syer 17de6689ab ENsure Vcap initializer runs before config file parser
Fixes gh-119.
2013-11-17 15:29:12 +00:00
Dave Syer 2f7214002d Update Spring to catch SPR-11069 2013-11-17 07:59:16 +00:00
Phillip Webb 0f85f31960 Polish 2013-11-16 01:22:10 -08:00
Phillip Webb 64f32893bb Source format and clean-up 2013-11-16 00:08:18 -08:00
Phillip Webb 883fd9162f Polish 2013-11-16 00:08:17 -08:00
Phillip Webb 127da15c3c Add homebrew formula as generated artifact 2013-11-16 00:08:17 -08:00
Phillip Webb 077cd662e7 Add zsh shell completion script 2013-11-16 00:08:14 -08:00