Commit Graph

2501 Commits (5f8fbfd73aa6c5fa3bb9e1c15a0cb381c93f8c44)
 

Author SHA1 Message Date
Phillip Webb 5f8fbfd73a Add Library abstraction
Add a Library class update the LibraryCallback interface and
implementations to use it. This change is in preparation for
an addition `unpack` flag that will be required to allow the
automatic unpacking of certain nested jars.

See gh-1070
11 years ago
Phillip Webb 3d6c8a85f4 Allow URL resolution within nested JARs
Update JarURLConnection to allow the resolution of items within a nested
jar, even if the jarFile passed to the connection is several levels up.

This prevent a connection from incorrectly resolving an entry against
the wrong jar file.

See gh-1070
11 years ago
Phillip Webb 5de2661b43 Drop RepackageTask.getDependencies()
Drop `RepackageTask.getDependencies` from the gradle plugin in favor of
exposing `getLibraries()` and using the callback.
Drop getDependencies
11 years ago
Phillip Webb c713c8091d Polish 11 years ago
Phillip Webb ed3df32cdd Extract resource handling to TomcatResources
Extract the nasty Tomcat resource handling reflection code to its own
class.
11 years ago
Phillip Webb 72a2e5bc02 Polish Gradle repackage 11 years ago
Dave Syer 965c16d93f Add foo.jar to fix broken build 11 years ago
Dave Syer 0e5201abe2 Fix typos (see gh-1135) 11 years ago
Dave Syer 542896b28f Support for non-executable JAR in addition to the repackaged one
Stretches the Gradle boot plugin a bit, so there's a sample build
in the "profile" sample. Howto docs give examples.

Fixes gh-1135
11 years ago
Dave Syer 1b97e8d921 Skip dependency exclusions if groupId is null
Fixes gh-1133
11 years ago
Jonas Bergvall 078db8cb74 Separate the configuration/creation of the default ObjectMapper
bean from the registration of Jackson modules to avoid circular creation
of the default ObjectMapper bean (and thus failing to obtain the ObjectMapper
and registering the module(s)).

Fixes gh-1132
11 years ago
Dave Syer 08ae390696 Add dependencies to inputs in bootRepackge
See gh-1113
11 years ago
Dave Syer 1bcc136374 Hack around with Tomcat resource paths
Tomcat 8 has different APIs again so it was quite difficult to
get it working and test it. The test is manual anyway (multi-module
project with JSPs in /META-INF/resources, not part of the samples),
and requires you to build a war and execute it (since the resource
paths are different when it's an archive).

Fixes gh-1131
11 years ago
Dave Syer 51496b4e4f Log exception in ErrorPageFilter
Fixes gh-1130
11 years ago
Dave Syer 772df9bea7 Add inputs to gradle bootRepackage task
See gh-1113
11 years ago
Phillip Webb 0768402d49 Merge pull request #1129 from ttddyy/document-remote-debug-gradle
* document-remote-debug-gradle:
  Add how-to remote debug from Gradle
11 years ago
Tadaya Tsuyukubo 5fbe5d4120 Add how-to remote debug from Gradle
Add a section to the reference documentation "how-to" about remote
debugging a Gradle started app.

Fixes gh-1129
11 years ago
Phillip Webb dbfd785e93 Merge branch 'gh-1119'
Improve fat JAR performance.

See gh-1119
11 years ago
Phillip Webb 20fb55ea47 Polish 11 years ago
Phillip Webb a3ceaf63e2 Improve performance of fat jar loading
Tweak 'fat jar' handling to generally improve performance:

- Allow JarURLConnection to throw a static FileNotFoundException when
  loading classes. This exception is thrown many times when attempting
  to load a class and is silently swallowed so there is no point in
  providing the entry name.
- Expose JarFile.getJarEntryData(AsciiBytes) and store AsciiBytes in
  the JarURLConnection. Previously AsciiBytes were created, discarded
  then created again.
- Use EMPTY_JAR_URL for the JarURLConnection super constructor. The URL
  is never actually used so we can improve performance by using a
  constant.
- Extract JarEntryName for possible caching. The jar entry name
  extracted from the URL is now contained in an inner JarEntryName
  class. This could be cached if necessary (although currently it is
  not because no perceivable performance benefit was observed)

Fixes gh-1119
11 years ago
Phillip Webb a8777eda76 Add JarFile caching
Cache root jar files in the Handler and also store nested jar files in
the JarEntryData.

See gh-1119
11 years ago
Phillip Webb 88195292dd Reuse previously parsed entries for filtered JARs
Update JarFile to reuse the previously parsed entries when creating
filtered jars. This saves needing to re-scan the underlying file to
recreate a subset of entries.

See gh-1119
11 years ago
Phillip Webb e9aab1e90c Drop JarEntryFilters from constructor and methods
Drop JarEntryFilter arguments from the JarFile constructor and the
getNestedJarFile methods. Filtered JarFiles can still be obtained by
using the getFilteredJarFile() method.

This helps simplify the code a little and will make it easier to add
caching.

See gh-1119
11 years ago
Phillip Webb 378d38e2e5 Polish doc formatting 11 years ago
Phillip Webb bfe4240ed2 Polish 11 years ago
Phillip Webb 445589a5d2 Polish RabbitMQ Changes
Fix the formatting which was messed up in commit ad1636fd. Also
simplify the RabbitProperties.setVirtualHost logic a little

See gh-1128
11 years ago
Phillip Wirth ad1636fd34 RabbitMQ virtual hosts can how start with a slash
The autoconfig strips out slashes where necessary to make a valid
hostname

Fixes gh-1128
11 years ago
Dave Syer 3411995736 Revert BootRunTask changes since they don't add anything
(Was an attempt to get Cygwin to recognise the interrupt, but it seems
to be doomed so not worth having the extra code in there really.)
11 years ago
Dave Syer e088ecd1bc Re-order shutdown hook in BootRunTask 11 years ago
Christian Dupuis b5d65bfc56 Delegate shell access decision to bean named "shellAccessDecisionManager"
In order to solve issues with multiple or incompatible AccessDecisionManagers, the CRaSH integration will now only delegate to an explicit shellAccessDecisionManager bean refs #1121
11 years ago
Dave Syer 9d5c371cf1 Clarify Maven plugin usage 11 years ago
Dave Syer 88379e2aa3 Check if response is committed before tryying to forward
It' sthe best we can do, but the container seems to still use our error page
(it just can't have the status code that we asked for).

Fixes gh-748
11 years ago
Dave Syer a8663586dc Trap SIGINT in Gradle plugin 11 years ago
Dave Syer 1e5882b19c Make copy of job parameters before weeding out non-identifying ones
Fixes gh-1125
11 years ago
Dave Syer c04deec6ee Move JMS docs under 'Messaging' 11 years ago
Dave Syer c6175073ae Be slightly more defensive in DataSource initialization
Adding an Order to the BeanPostProcessor and catching an exception
are enough to get a simple web app with @EnableGlobalMethodSecurity
and JDBC user details running. It actually doesn't solve an underlying
problem in Spring Security, but I'll deal with that separately.

See gh-1115
11 years ago
Dave Syer af825fa439 Clarify docs on Gradle configuration 11 years ago
Phillip Webb 34a32991fa Be defensive about solr classes required
Update SolrAutoConfiguration to specifically require HttpSolrServer
and CloudSolrServer classes rather than the generic SolrServer.

This prevents the rather cryptic "@ConditionalOnMissingBean annotations
must specify at least one bean" error that can occur if an earlier
version of solr happens to be on the classpath (as is the case when
hibernate-search is used).

Fixes gh-1098
11 years ago
Phillip Webb a2efe17fc9 Polish 11 years ago
Phillip Webb 46c46dbd0c Refine Spring Social auto-configuration
Refine auto-configuration for Spring Social to:

- Only auto-configure FB/Twitter/LinkedIn if the `app-id` property is
  set.
- Only configure ConnectController and ProviderSignInController if
  there is a ConnectionFactoryLocator.
- Auto-configure Spring Social's SpringSocialDialect for Thymeleaf if
  Thymeleaf is present.
- Added several tests around Spring Social auto-configuration.

Fixes gh-1118
11 years ago
Phillip Webb 179e1558f6 Polish 11 years ago
Dave Syer 2433f721bc Add 'classifier' property to Gradle plugin
The default behaviour doesn't change with this commit, but now
the user has the option to specify a 'classifier' property
either in springBoot { classifier = 'exec' } (i.e. globally
for all repackage tasks) or in each repackage task, e.g.
bootRepackage { classifier = 'exec' }. In that case the original
archive is not overwritten but copied into <file>-<classifier>.jar
(or .war etc.) and then enhanced.

Fixes gh-1113, fixes gh-141 also I believe.
11 years ago
Christian Dupuis edffabeee4 Make sure Spring related security beans for the shell are not installed if not wanted
refs #1121
11 years ago
Dave Syer f8e847a6fc Change ordering of DataSourceInitializer a bit
It needs to run as soon as the DataSource is available really otherwise
anything else that depends on the DataSource (like Security JDBC
initializers) might fail when it tries to use it.

One change from 1.1.1 is that if you have a schema.sql you had better
make sure your data.sql talks to the same tables. In 1.1.1 you could
sometimes get away with letting Hibernate initialize the tables for
your data.sql and *also* have a schema.sql. This was fragile and doomed
to fail eventually if the DataSourceInitializer somehow got
initialized earlier (e.g. through a @DependsOn), so in the spririt
of honesty being the best policy we explicitly disallow it now.

Fixes gh-1115
11 years ago
Dave Syer 7fc1f19389 Fix WS sample to use a random port 11 years ago
Dave Syer f0393f9ca6 Remove deprecated use of Compile to work with Gradle 2.0+
The class Compile was deprecated and will be removed in Gradle 2.0 (it is
already removed in the release canidate).

Instead we should use JavaCompile. Fixes gh-1066.
11 years ago
Dave Syer e39fafcc33 Add JDBC user details to web-secure sample
See gh-1115
11 years ago
Phillip Webb 8a1279315e Move ApplicationContextTestUtils to src/test
Move ApplicationContextTestUtils from src/main to src/test since it
is probably of limited use to others.

Fixes gh-1034
11 years ago
Phillip Webb 25eb6fb81a Polish 11 years ago
Christian Dupuis b439d3522e Fix VanillaHealthIndicator javadoc 11 years ago