Commit Graph

5742 Commits

Author SHA1 Message Date
Dave Syer
1f82ef4deb Ensure JPA/Security are not fighting with each other on startup
This is *really* nasty (and led me to discover a related bug
https://jira.spring.io/browse/SPR-11844), but fortunately easy to
hide from users once you have a test case.

The problem is that Spring Security registers a `BeanPostProcessor`
to handle `GlobalAuthenticationConfigurerAdapters`, and Boot
registers a `BeanPostProcessor` to handle injecting the packages
to scan into an `EntityManagerFactory` from `@EntityScan`. The
clash comes because the `EntityScanBeanPostProcessor` wants to be
postprocessed by the Security postprocessor, but if the Security
configuration depends on JPA it won't be ready in time.

The fix (or workaround) depending on how you look at it is to
prevent the other bean post processors from taking an interest in
`EntityScanBeanPostProcessor` at all (mark it as synthetic).

Fixes gh-1008
2014-06-02 19:32:17 +01:00
Dave Syer
49a09c807c Defer SQL initialization to fit with JPA better
Added 2 new spring.datasource.* properties ("data" like
"schema", and "deferDdl" like the "spring.jpa.hibernate.*"
flag). The SQL scripts are then run separately and the "data"
ones are triggered by a new DataSourceInitializedEvent,
which is also published by the Hibernate DDL schema export.

Fixes gh-1006
2014-06-02 13:10:50 +01:00
Dave Syer
efcbb32788 Remove some compiler warnings 2014-06-02 10:56:12 +01:00
Phillip Webb
cb89995153 Add spring-boot-versions to the prepare profile 2014-06-01 23:15:31 +01:00
Phillip Webb
69d7f4bec3 Add spring-boot-versions to the full build 2014-06-01 22:31:31 +01:00
Phillip Webb
f95cb602cc Fix CLI command/option package tangle
Fix package tangle in CLI my extracting ExitStatus to a status package.

See gh-1004
2014-06-01 18:59:09 +01:00
Phillip Webb
5da23e9968 Fix grape -> compiler package tangle
Fix package tangle by moving DependencyResolutionContext from the
compiler package to grape.

See gh-1004
2014-06-01 18:49:13 +01:00
Phillip Webb
84da33f176 Add more enforcer rules 2014-06-01 14:04:07 +01:00
Phillip Webb
738d195587 Create JMS sub-packages
Reorganize the `jms` package into `hornetq` and `activemq` sub-pacakges.

Fixes gh-1005
2014-06-01 13:49:41 +01:00
Phillip Webb
d2fbef02e7 Fixup POM errors 2014-06-01 13:27:34 +01:00
Phillip Webb
e5cda040b0 Restore test classes
Restore test classes accidentally deleted and ignored in c43fd04f3e.
2014-06-01 13:11:25 +01:00
Phillip Webb
8aaaaa48a6 Fix broken documentation links 2014-06-01 13:02:04 +01:00
Phillip Webb
82a25ea7f8 Merge branch 'gh-408' 2014-06-01 12:54:56 +01:00
Phillip Webb
0e4b1a4ad0 Add Elasticsearch appendix links
See gh-408
2014-06-01 12:54:42 +01:00
Phillip Webb
c43fd04f3e Add Elasticsearch tests
Add unit tests for elasticsearch packages. Also refactor some
of the existing tests to prevent Repository clashes.

See gh-408
2014-06-01 12:54:42 +01:00
Artur Konczak
99940337a9 Add support for Elasticsearch
Add auto-configuration and starters for Elasticsearch.

Fixes gh-408
2014-06-01 12:54:42 +01:00
Dave Syer
b31295246c Make WebRequestTraceFilter once per request 2014-06-01 09:47:23 +01:00
Phillip Webb
c719ab7aee Exclude commons-logging from starter POMs
Update all relevant starter POMs to include a `spring-core` dependency
with an exclusion on `commons-logging`. This prevents `commons-logging`
and `jcl-over-slf4j` from both being on the classpath.

Also add enforcer rules to ensure that commons-logging doesn't sneak
back in, and that there is no dependency convergence. (some additional
libraries were required in spring-boot-dependencies)

Tested with a sample maven project as well as using the `spring jar`
command.

Fixes gh-985
2014-05-31 01:10:06 +01:00
Phillip Webb
28cf21dbf9 Add .jar to git ignore
Hopefully preventing any accidental commits.
2014-05-30 23:46:30 +01:00
Andy Wilkinson
212c30f6c7 Enhance DependencyCustomer: allow type and classifier to be specified
Closes #1002
2014-05-30 23:27:07 +01:00
Andy Wilkinson
059d504fd7 Fix DependencyCustomizerTests following merge of 1.0.x 2014-05-30 23:27:06 +01:00
Andy Wilkinson
0d7da4375f Merge branch '1.0.x' 2014-05-30 23:26:59 +01:00
Stephane Nicoll
5a69bb9267 Add HornetQ JMS support
Provide auto-configuration support for HornetQ JMS broker, along with
an additional starter POM.

The connection factory connects to a broker available on the local
machine by default. A configuration switch allows to enable an embedded
mode that starts HornetQ as part of the application.

In such a mode, the spring.hornetq.embedded.* properties provide
additional options to configure the embedded broker. In particular,
message persistence and data directory locations can be specified. It is
also possible to define the queue(s) and topic(s) to create on startup.

Fixes: gh-765
2014-05-30 23:26:07 +01:00
Andy Wilkinson
abc1e5de8f Fix ifAnyMissingClasses to return false if no classes are missing
Fixes #1003
2014-05-30 17:28:03 +01:00
Phillip Webb
329175b956 Fix Jasper on Tomcat 8
Refactor Jasper initialization code to call JasperInitializer during
server start.

Fixes gh-962
See gh-919
2014-05-30 17:09:19 +01:00
Phillip Webb
790e615741 Fix URL methods in JarURLConnection
Update JarURLConnection to return correct values from `getURL()`,
`getJarFileURL()` and `getEntryName()`.

Fixes gh-973
2014-05-30 17:09:19 +01:00
Phillip Webb
355f63892d Unify versions in POMs started by the invoker
Unify the versions used in integration tests launched by the
maven-invoker-plugin. Allows for already cached local copies to be
used, hopefully speeding up the build.
2014-05-30 17:09:19 +01:00
Phillip Webb
67beba9464 Switch HSTS enum to upper case.
Since the RelaxedBinder now supports it.
2014-05-30 16:47:30 +01:00
Phillip Webb
a947eb7660 RelaxedConversionService support lowercase enums
Update RelaxedConversionService to support enums that are themselves
declared as lower-case (or mixed case) items.

Fixes gh-996
2014-05-30 16:47:30 +01:00
Phillip Webb
97acd20d62 Polish 2014-05-30 16:47:30 +01:00
Stephane Nicoll
c451de18f7 Fix resource directory location
This commit fixes the main resources directory location so that it also
works in a multi-projects setup.

Fixes gh-993
(cherry picked from commit a69f518)
2014-05-30 17:43:24 +02:00
Stephane Nicoll
a69f518c42 Fix resource directory location
This commit fixes the main resources directory location so that it also
works in a multi-projects setup.

Fixes gh-993
2014-05-30 17:37:29 +02:00
Phillip Webb
c2e1676849 Allow case insensitive enums in RelaxedDataBinder
Update RelaxedDataBinder to hook in an additional
RelaxedConversionService which can deal with case insensitive enum
mappings.

The RelaxedConversionService could be extended in the future with
additional converters if necessary.

Fixes gh-996
2014-05-30 15:35:53 +01:00
Andy Wilkinson
2fec9c4790 Merge branch '1.0.x' 2014-05-30 15:33:47 +01:00
Andy Wilkinson
8f7c96e8f0 Honour ext and classifier on @Grabbed dependencies
We currently honour type, but ignore ext. Aether doesn't make a
distinction between the two so a Grab that specifies both type and ext
but with different values is considered to be an error.

Fixes #995
2014-05-30 15:12:09 +01:00
Dave Syer
ef7390d3f0 Add extra @Conditional to be defensive in Social autoconfig
Older versions of Spring Social will not have the SocialConfigurerAdapter
so making social autoconfig conditional on that class makes sense (since it
all extends from it).

Fixes gh-986
2014-05-30 15:11:24 +01:00
Dave Syer
5557061ba1 Add social-* starters to dependency bom 2014-05-30 15:11:24 +01:00
Dave Syer
29cb21c322 Be lenient with prefix and add period if missing 2014-05-30 15:11:24 +01:00
Phillip Webb
3541495041 Drop unused objectstyle.org maven repo
Looks like a hang over from some older code.
2014-05-30 13:24:57 +01:00
Dave Syer
f2e2df6759 Merge remote-tracking branch 'origin/1.0.x' 2014-05-30 13:15:49 +01:00
Dave Syer
2025dbad61 Switch basic auth back on in web-secure
Setting security.basic.enabled=false in a secure
app doesn't make a lot of sense. The sample has it
set to true now (the default) so users can login
(via the form that is sitting in front of the
basic auth filter chain).

Fixes gh-997
2014-05-30 13:10:39 +01:00
Dave Syer
ed15f742fd Fix bug in GroovyTemplate convenience
It was ignoring the engine argument in the 3 arg version
of template().
2014-05-30 11:32:02 +01:00
Dave Syer
b0579c1cf3 Ensure JPA vendor properties are period separated
If you bind to Map<String,Object> you get a nested Map instead
of period-separated keys. This change just makes JpaProperties
expose a Map<String,String> so the keys are sane.

Fixes gh-988
2014-05-30 10:25:01 +01:00
Dave Syer
2f653f0616 Add support for Spring HTTP in CLI tests 2014-05-30 10:18:11 +01:00
Andy Wilkinson
51518a2041 Upgrade to Spring Integration 4.0.2 and Spring AMQP 1.3.4
Closes #994
2014-05-30 09:23:53 +01:00
Andy Wilkinson
bbf8ddc97c Provide dependency management for all of Spring Social 2014-05-30 09:06:49 +01:00
Dave Syer
1d7caf8e31 Man up and deal with CSRF in integration test
Fixes gh-979
2014-05-30 08:21:57 +01:00
Dave Syer
ed0cfea6d2 Add SmartImportCustomizer
Only imports classes with names that are not already
imported into teh SourceUnit

Fixes gh-983
2014-05-30 06:44:38 +01:00
Phillip Webb
11a093bdc0 Polish 2014-05-30 00:31:11 +01:00
Dave Syer
48c1228253 Add support for groovy utilities in "spring jar"
Also an integration test that uses the (new)
@EnableGroovyTemplates to switch on the template conveniences
in a non-webapp

Fixes gh-990
2014-05-29 18:21:27 +01:00