Commit Graph

1368 Commits

Author SHA1 Message Date
Phillip Webb
9049291d9a Attempt to fix Travis-CI log size error 2014-02-04 00:21:42 -08:00
Phillip Webb
37069d91d8 Fix spring.active.profiles repeated loading
Fix `ConfigFileApplicationListener` to repeatedly load property sources
and activate profiles using any defined `spring.active.profiles`
properties.

This restores the ability to have a property in a profile specific
file that defines additional profiles.

Fixes gh-308
2014-02-03 23:36:56 -08:00
Phillip Webb
0f083c2f9d Fix CLI class tangle 2014-02-03 21:25:12 -08:00
Phillip Webb
1061d582dc Fix CLI package tangles 2014-02-03 21:25:12 -08:00
Phillip Webb
70cb8cfed6 Fix CLI package and class tangles 2014-02-03 21:25:04 -08:00
Phillip Webb
1552759584 Fix package tangle by moving AsciiBytes 2014-02-03 17:26:10 -08:00
Phillip Webb
f7d4490b2d Fix package tangle with AutoConfigurationReport
Rename AutoConfigurationReport to ConditionEvaluationReport and
co-locate with conditions.
2014-02-03 17:25:50 -08:00
Phillip Webb
32f3e353b4 Fix class tangle 2014-02-03 16:40:49 -08:00
Phillip Webb
042e512d3d Fix package tangle
Fix package tangle between the `org.springframework.boot` and the
`event` sub-package. A new `SpringApplicationRunParticipant` abstraction
has been introduced, with the `event` package solely responsible for
handling event multi-casting.
2014-02-03 16:34:40 -08:00
Phillip Webb
c0a5c763b6 Fix class tangle 2014-02-03 15:20:20 -08:00
Phillip Webb
8ff5ce3528 Polish 2014-02-03 15:16:53 -08:00
Phillip Webb
f6a341e79f Don't consider sources as Initializer or Listener
Update SpringApplication so that source objects are no longer considered
as ApplicationListeners or ApplicationContextInitializer.
2014-02-03 15:14:18 -08:00
Christian Dupuis
5e2cfe1cfe Add some javadoc. Fix typos. 2014-02-03 09:55:46 +01:00
Phillip Webb
6431fef91e Polish 2014-01-31 22:51:41 -08:00
Phillip Webb
a97bcfe3cd Automatically detect 'development' profile
Detect when an application is running in development (by the presence
of a build file) and automatically add a 'development' profile.

Additional detectors can be developed by implementing the
`ProfileDetector` interface and registering with the `SpringApplication`

Fixes gh-296
2014-01-31 22:51:31 -08:00
Phillip Webb
643295cc3c Separate Application Listener and Initializer
Update SpringApplication so that ApplicationListener and
ApplicationInitializer methods must be called separately. This helps
to prevent unexpected side effects when calling the setters and
also encourages separation of concerns.

The few situations where a class was both an ApplicationInitializer
and ApplicationListener are now handled by registering an inner
listener from the `initialize` method.
2014-01-31 14:45:18 -08:00
Phillip Webb
92f01cf9bc Rename SpringApplication Events
Move SpringApplication events to their own package, create a common
base class and rename classes to match Spring conventions.
2014-01-31 11:00:50 -08:00
Dave Syer
818326d820 Turn down logging in spring-boot tests 2014-01-31 16:41:28 +00:00
Dave Syer
7a452d5bc0 Fix test that fails because of pretty printing 2014-01-31 16:38:09 +00:00
Clint Checketts
f6c12e0be1 Explain that YAML files can't be loaded via @PropertySource 2014-01-31 16:00:04 +00:00
Christian Dupuis
b641a0d2a5 Enable json pretty print in actuator sample 2014-01-31 12:16:17 +01:00
Christian Dupuis
8a55fbebb2 Allow pretty printed JSON output (nicer for demos and easier to read)
Defaults to false
2014-01-31 12:16:17 +01:00
Christian Dupuis
3911ce3e29 Filter out CGLIB generated bean properties from configuration properties report 2014-01-31 12:16:17 +01:00
Christian Dupuis
6519ee0171 Change order of properties in endpoint mbean objectNames to make display in jconsole nicer 2014-01-31 12:16:17 +01:00
Phillip Webb
c65dc9063c Don't expose URLs from InnerLoader
Update the CLI Groovy InnerLoader to not expose URLs. This prevents the
'TLD skipped' log messages from Tomcat that occurred previously due to
the InnerLoader and parent returning the same URLs.

Fixes gh-277
2014-01-30 14:32:16 -08:00
Phillip Webb
9d35004fff Upgrade to logback 1.1.0
Fixes gh-288
2014-01-30 13:02:13 -08:00
Dave Syer
2bd6026a2a Exclude null and empty properties from /autoconfig 2014-01-30 10:37:22 +00:00
Dave Syer
a21397dbe2 Fix AutoConfigurationReport parent location
BeanFactory.getBean() already looks in the parent context
so we have to be careful and not use the parent when locating
the report singleton

Fixes gh-290
2014-01-30 10:20:39 +00:00
Dave Syer
3e9457ea8e Make @ConfigurationProperties available in @PostConstruct
Also means that persistence annotation processing can take advantage
of external properties bound in this way.
2014-01-30 10:14:35 +00:00
Dave Syer
99a2338323 Fix sample (Exception type changed in Mongo) 2014-01-30 10:06:35 +00:00
Dave Syer
a592215651 Use non-deprecated API to create Mongo client 2014-01-30 09:08:18 +00:00
Dave Syer
63fefbd7e7 Assert that parent autoconfig report is matched to parent BeanFactory
Test for gh-290
2014-01-30 09:01:06 +00:00
Dave Syer
9eb71c157a Remove unnecessary @Conditional 2014-01-30 09:00:40 +00:00
Oliver Gierke
760a174998 Added starter for Spring Data MongoDB.
Fixes gh-272
2014-01-30 08:52:59 +00:00
Phillip Webb
3e7af3ddb8 Improve exception messages on nested jar failure
Updates gh-284
2014-01-29 23:00:20 -08:00
Phillip Webb
14bc06a387 Pull-up duplicated code to Launcher 2014-01-29 22:46:39 -08:00
Phillip Webb
208bf8fc96 Polish CLI Jar generation 2014-01-29 22:46:31 -08:00
Phillip Webb
d648603634 Exclude *.jar and *.groovy from generated JARs
Update `JarCommand` to exclude `**/*.groovy` and `**/*.jar` by default.
2014-01-29 16:10:14 -08:00
Phillip Webb
c852fb5a79 Update packaged JARs to use standard JarLauncher
Change CLI generated JARs to use the standard `JarLauncher` instead of
a custom `JarRunner`. The `PackagedSpringApplicationLauncher` is used
as the `Start-Class` which in turn calls `SpringApplication.run()`.
2014-01-29 16:01:50 -08:00
Christian Dupuis
5cf2387e58 Append context id to objectName of Endpoint MBeans if name already exists in MBeanServer 2014-01-29 21:06:32 +01:00
Dave Syer
9758ca5535 Add some more detail on security config options 2014-01-29 16:16:03 +00:00
Dave Syer
4d608f20e9 Support for AuthenticationManagerBuilder injection into user code
Spring Boot provides a default AuthenticatiomManager for getting
started quickly with security and never exposing insecure
endpoints. To override that feature as users move to the next
stage in their project, they may have to do something slightly
different depending on whether it is a webapp or not.

In any app (web or not), providing a @Bean of type
AuthenticationManager always works, but you don't get the benefit of
the builder features.

In a webapp the user can also extend WebSecurityConfigurerAdapter
to provides a custom AuthenticationManager, and the preferred
way of doing that is via a void method that is autowired with an
AuthenticationManagerBuilder. The default AuthenticationManager is
built in a configurer with @Order(LOWEST_PRECEDENCE - 3) so
to override it the user's confugrer must have higher precedence
(lower @Order).

@EnableGlobalMethodSecurity can also be used in a non-webapp, and
Spring Boot will still provide a default AuthenticationManager.
To override it the user has to either extend
GlobalMethodSecurityConfiguration or provide a @Bean of type
AuthenticationManager (there's no other way to
capture the AuthenticationManagerBuilder that doesn't happen too late
in the beans lifecyle).

Fixes gh-244
2014-01-29 15:47:46 +00:00
Andy Wilkinson
96e10104e4 Add a command to produce a self-contained executable JAR for a CLI app
A new command, jar, has been added to the CLI. The command can be
used to create a self-contained executable JAR file from a CLI app.

Basic usage is:

spring jar <jar-name> <source-files>

For example:

spring jar my-app.jar *.groovy

The resulting jar will contain the classes generated by compiling the
source files, all of the application's dependencies, and entries
on the application's classpath.

By default a CLI application has the current working directory on
its classpath. This can be overridden using the --classpath option.
Any file that is referenced directly by the classpath is always
included in the jar. Any file that is found a result of being
contained within a directory that is on the classpath is subject to
filtering to determine whether or not it should be included. The
default includes are public/**, static/**, resources/**,
META-INF/**, *. The default excludes are .*, repository/**, build/**,
target/**. To be included in the jar, a file must match one of the
includes and none of the excludes. The filters can be overridden using
the --include and --exclude options.

Closes #241
2014-01-29 14:05:15 +00:00
Phillip Webb
a99a38966f Switch to Spring Framework 4.0.1.RELEASE 2014-01-28 17:50:50 -08:00
Phillip Webb
5817a01601 Merge pull request #285 from bstick12/master
* pull285:
  Fix TomcatContextCustomizers Assert.notNull checks
2014-01-28 10:09:02 -08:00
bstick12
0fdd7e1843 Fix TomcatContextCustomizers Assert.notNull checks
Correct null assertion checks on setters for TomcatContextCustomizers
and TomcatContextCustomizers
2014-01-28 10:07:27 -08:00
Christian Dupuis
be1dc647a5 Beans annotated with @ConfigurationProperties can be their own validators when implementing Spring's Validator interface
fixes #255
2014-01-28 17:03:07 +01:00
Dave Syer
bfff4654df Upgrade spring-data-redis to 1.1.1
Fixes gh-258
2014-01-28 16:02:18 +00:00
Dave Syer
216bd16b7a Remove unneeded explicit versions in sample 2014-01-28 15:19:24 +00:00
Christian Dupuis
07238b1ce8 Restructure /configprops output
/configprops output now contains the prefix from @ConfigurationProperties as wells as bean name and actual properties

fixes #267
2014-01-28 14:42:00 +01:00