Commit Graph

23481 Commits

Author SHA1 Message Date
Dave Syer
7454c4866b Support for @ConfigurationProperties in JPA
Adds JpaProperties to bind to spring.jpa.* (making those
properties easier to reason about and visible in the
/configprops endpoint).

Also allows easy configuration of multiple EntityManagerFactories via new
EntityManagerFactoryBuilder. JpaBaseConfiguration has a @Bean of that type
so users can inject it to create new or additional EntityManagerFactories.
This also simplifies the Hibernate autoconfiguration.

Also renames the DataSourceFactory to DataSourceBuilder (since that's what it
is).
2014-05-15 09:18:38 +01:00
Stephane Nicoll
f7397f1d1c Merge pull request #874 from ShawnTuatara/patch-1
* patch-1:
  Fix wrong closing tag
2014-05-15 10:02:32 +02:00
Shawn Clark
4021ad43f7 Fix wrong closing tag
Fixes gh-874
2014-05-15 10:02:01 +02:00
Stephane Nicoll
dacad22fd3 Fix jvmArgs usage example
The  configuration within an execution is only applied when that
particular execution is invoked as part of the build. It is not
applied when the plugin is invoked on the command line (i.e.
mvn spring-boot:run).

This commit clarifies the situation so that users can safely copy/paste
those bits and get the expected behavior.

 Fixes gh-875
2014-05-15 09:59:46 +02:00
Christian Dupuis
549daaefa4 Update CRaSH dependency to 1.3.0-beta20
fixes #849
2014-05-14 15:45:47 +02:00
Dave Syer
b5e608f102 Remove mention of missing starters 2014-05-14 13:42:04 +01:00
Dave Syer
c65337c872 Upgrade Reactor again 2014-05-14 13:42:04 +01:00
Stephane Nicoll
a93784207e Add jvmArguments property to maven plugin
The maven plugin now forks a new process when it starts a boot app. This
makes remote debugging of the app impossible without the ability to pass
extra JVM arguments.

This commit adds a "jvmArguments" attribute to the RunMojo that defines
additional JVM arguments to set on the forked process.

Fixes gh-848
2014-05-14 13:26:11 +02:00
Dave Syer
5249f54c5a Integrate @ConfigurationProperties @Beans with DataSource configuration
We now have a much simpler DataSourceAutoConfiguration that binds to whatever
DataSource concrete type it finds at runtime. To be able to quickly switch between
Hikari and the other types of DataSource there's a minute shim for translating
the common properties (username, password, url, driverClassName), but actually
only url is different. The shim and also DataSource initialization is supported
through DataSourceProperties, but the other native properties get bound directly
through the concrete runtime type of the DataSource.

The /configprops endpoint works (and is exposed in the actuator sample).

Fixes gh-840, fixes gh-477, see also gh-808.
2014-05-13 16:46:04 +01:00
Dave Syer
660b73b5c6 Ensure only bindable properties are reported in /configprops
Introspects the properties that are being exposed in the report
and only renders the ones that are a) convertible from String
and b) have a setter. That goes a long way to making it a bullet
proof generic renderer of any Java object that can be bound with
@ConfigurationProperties.
2014-05-13 16:46:03 +01:00
Dave Syer
85719f75e4 Add @Bean-level config properties to /configprops 2014-05-13 16:45:48 +01:00
Dave Syer
0d27ce4850 Enable @ConfigurationProperties on a @Bean definition
This allows multiple beans of the same type to be bound with
different prefixes. As a side effect you get default binding
if the bean class is itself @ConfigurationProperties.
2014-05-13 16:45:48 +01:00
Dave Syer
1b284a0619 Add RelaxedDataSourceFactory 2014-05-13 16:45:48 +01:00
Christian Dupuis
9e56c38b7a Rename DefaulErrorAttributes to DefaultErrorAttributes
fixes #853
2014-05-13 17:43:28 +02:00
Christian Dupuis
d8ec2719d7 Fix RedisAutoConfiguration with pool config
fixes #850
2014-05-13 17:32:53 +02:00
Spring Buildmaster
b38601a2f2 Next development version 2014-05-12 15:28:30 -07:00
Phillip Webb
d09c557e4e Revert "Next development version"
This reverts commit 32d778e508.
2014-05-12 22:46:25 +01:00
Spring Buildmaster
32d778e508 Next development version 2014-05-12 13:40:01 -07:00
Phillip Webb
af26a84a8f Use reactor 1.1.0.RELEASE rather than SNAPSHOT
Downgrade from 1.1.1.BUILD-SNAPSHOT to 1.1.0.RELEASE in order to
satisfy enforced release requirements.
2014-05-12 21:03:22 +01:00
Phillip Webb
30ac768cbf Remove @ControllerAdvice from BasicErrorController
Update the BasicErrorController so that it no longer needs to implement
@ControllerAdvice or have an @ExceptionHandler method.

A new ErrorAttributes interface is now used to obtain error details,
the DefaultErrorAttributes implementation uses a
HandlerExceptionResolver to obtain root exception details if the
`javax.servlet.error.*` attributes are missing.

This change also removes the need for the extract(...) method on
ErrorController as classes such as WebRequestTraceFilter can
now use the ErrorAttributes interface directly.

See gh-839, gh-538
Fixes gh-843
2014-05-12 19:46:57 +01:00
Dave Syer
5dd77a725c Enable access log explicitly in sample 2014-05-12 10:51:47 +01:00
Andy Wilkinson
fec136e213 Merge branch '1.0.x'
Conflicts:
	spring-boot-dependencies/pom.xml
2014-05-12 10:37:06 +01:00
Andy Wilkinson
f761daf253 Upgrade to CRaSH 1.3.0-beta18
Closes #841
2014-05-12 10:35:20 +01:00
Dave Syer
59a899a4da Add @ResponseStatus handler to global exception handler
We might need to revisit this to allow more fine-grained
control by users, but it seems like a sensible default.
The BasicErrorController now uses both of the deafult strategies
(ResponseStatusExceptionResolver and DefaultHandlerExceptionResolver)
from Spring MVC to try and determine an appropriate response.

Fixes gh-839
2014-05-12 09:02:28 +01:00
Lukasz Kryger
e7484c66f5 Registering PID file to be deleted on JVM exit 2014-05-11 09:21:19 -07:00
Phillip Webb
61221f84a9 Remove Spring Security BOM
Temporarily remove the Spring Security BOM import as version numbers
for the imported projects don't automatically get resolved by the
gradle plugin.

See gh-838
2014-05-11 09:33:31 +01:00
Phillip Webb
61232395d8 Fixup versions 2014-05-10 23:47:31 +01:00
Phillip Webb
57eec8ccaa Update boot version in other build samples
Add replace goals to update the Spring Boot version in the gradle and
ant samples during the release process.

Fixes gh-425
2014-05-10 23:45:22 +01:00
Phillip Webb
af3fb7f080 Fix maven warnings
Fix maven warnings caused by missing version information on the
root POM.
2014-05-10 23:04:24 +01:00
Phillip Webb
cba1218f12 Merge pull request #837 from kryger/_data-platform
* _data-platform:
  Read data-{platform}.sql in addition to data.sql
2014-05-10 22:51:49 +01:00
Lukasz Kryger
254b175c0a Read data-{platform}.sql in addition to data.sql
Update DataSourceAutoConfiguration to read platform specific `data.sql`
files in the same way as `schema.sql` files.

Fixes gh-837
2014-05-10 22:49:49 +01:00
Phillip Webb
bd38893f55 Rename rabbitHealthIndicator bean
Rename the rabbitHealthIndicator bean which was accidentally named
redisHealthIndicator.
2014-05-10 22:34:18 +01:00
Christian Dupuis
0402ed38f7 Update documentation to include note about RabbitMQ health support 2014-05-10 11:17:01 +02:00
Christian Dupuis
a62bc9ca60 Polish 2014-05-10 11:15:31 +02:00
Christian Dupuis
b026b13c66 Add HealthIndicator for Rabbit 2014-05-10 11:12:04 +02:00
Phillip Webb
dac03fdb7b Extract WebMvcProperties
Extract WebMvcProperties from WebMvcAutoConfiguration and also
update conditionals to use @ConditionalOnProperty.
2014-05-10 00:25:49 +01:00
Phillip Webb
1c0cce441d Add spring.resources.add-mappings property
Add `spring.resources.add-mappings` allowing users to configure if
resource mappings should be added or not.

Fixes gh-804
2014-05-10 00:23:13 +01:00
Phillip Webb
4b51b6f9df Support relaxed names with ConditionalOnProperty
Update ConditionalOnProperty to optionally support relaxed form names.

Fixes gh-835
2014-05-10 00:23:05 +01:00
Phillip Webb
f80d23ada7 Clarify why you might not use the starter parent
Update reference documentation to make it clearer why you might not
always want to use the spring-boot-starter-parent.

Fixes gh-774
2014-05-09 19:24:03 +01:00
Andy Wilkinson
d41a47f247 Update Spring Plugin to 1.1.0.RELEASE
Update to latest release of Spring Plugin and provide dependency
management for all of its modules

Closes #802
2014-05-09 11:06:53 +01:00
Phillip Webb
606ecf1f83 Merge branch '1.0.x' 2014-05-09 09:03:57 +01:00
Phillip Webb
8eca40a388 Add explicit hamcrest-core dependency
Add an explicit dependency to `hamcrest-core` in the
`spring-boot-starter-test` POM. This prevents version 1.1 from
accidentally being pulled in via junit.

Fixes gh-810
2014-05-09 09:01:59 +01:00
Phillip Webb
1acffdf649 Polish 2014-05-09 08:52:11 +01:00
Andy Wilkinson
f3a40e03bb Polish spring-boot-dependencies
Reorder dependencies so that they're consistently in alphabetical
order
2014-05-08 17:26:16 +01:00
Maciej Walkowiak
b79132ceff Update @ConditionalOnProperty to not match false
Update @ConditionalOnProperty so that properties that are present but
contain the value `false` are not considered a match.

Fixes gh-812
2014-05-08 16:17:38 +01:00
Phillip Webb
d9bf538e95 Document repackage in maven without parent POM
Fixes gh-811
2014-05-08 16:17:37 +01:00
Christian Dupuis
51dddc2dc4 Add gc information to /metrics endpoint 2014-05-08 17:10:37 +02:00
Christian Dupuis
c38f9bcdfa Add missing tests 2014-05-08 16:58:52 +02:00
Christian Dupuis
dfd6f91aef Merge pull request #819 from cdupuis/health-indicator
Rework HealthIndicator support
2014-05-08 16:40:44 +02:00
Christian Dupuis
288e7a5d92 Rename missing test 2014-05-08 16:32:50 +02:00