Commit Graph

32044 Commits

Author SHA1 Message Date
Phillip Webb 5c6dd52e9a Polish 2013-10-17 14:12:42 -07:00
Dave Syer 43f8a71af4 Ensure JdbcTemplate and DB initializer still work when user supplies DataSource 2013-10-16 13:43:59 -04:00
Dave Syer f43cf1db61 Stop log4j from moaning on startup 2013-10-16 13:42:51 -04:00
Dave Syer fede0d1c98 Add profiles to /env 2013-10-16 13:42:13 -04:00
Dave Syer 47cd5dd679 Tooling for PropertiesLauncher in JAR archives
To use PropertiesLauncher instead of JarLauncher in an
executable JAR we have provided tooling support. In Maven
(using the starter parent to default some of the settings):

    <plugin>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-maven-plugin</artifactId>
      <configuration>
        <layout>ZIP</layout>
      </configuration>
    </plugin>

in Gradle:

    apply plugin: "spring-boot"
    springBoot {
        layout = 'ZIP'
      }
    }

[Fixes #58837492] [bs-330] Add tooling for PropertiesLauncher
2013-10-16 08:49:51 -04:00
Dave Syer 837070d6e9 Tidy up log message (add space) 2013-10-15 16:51:58 -04:00
Dave Syer acf458b462 Standardize on spring.datasource.* for database config
[Fixes #58921238] [bs-333] spring.database.* and
spring.datasource.* used to configure database
2013-10-15 16:39:59 -04:00
Dave Syer ea11dafcbd Extend PropertiesLauncher to load nested archives
PropertiesLauncher can now be used to run an executable jar, and by
default it will pick up nested archives in lib/ (where the Boot
tools puts them). User can provide loader.path (colon-separated)
to change the nested path.

[#58837492] [bs-330] Add tooling for PropertiesLauncher
2013-10-15 11:08:45 -04:00
Dave Syer b7ed5bbc76 Revert "Temporary fix for Spring snapshot changes"
This reverts commit 8a804f6185.
2013-10-15 10:16:29 -04:00
Dave Syer d4d9ebcabd Small re-org of PropertiesLauncher 2013-10-15 09:56:52 -04:00
Dave Syer 8a804f6185 Temporary fix for Spring snapshot changes 2013-10-15 09:56:19 -04:00
Dave Syer be1263500d Ensure env vars are consulted for PATH 2013-10-14 16:07:50 -04:00
Dave Syer 281c650251 Add git commit id to MANIFEST in boot tools repackager 2013-10-14 16:06:32 -04:00
Dave Syer b0c54a6588 Add parent class loader entries if possible
...otherwise you can see cryptic NoClassDefFound errors
because the application class was loaded from the parent
on the file system, but then it doesn't have access to the
child loaders nested jars.
2013-10-14 16:02:04 -04:00
Dave Syer 114b7a5e95 Ensure UPPER_CASE overrides work in PropertiesLauncher 2013-10-14 11:16:40 -04:00
Dave Syer 17e24fd17d Add extra test for placeholder behaviour 2013-10-14 11:16:00 -04:00
Dave Syer efb66dcdb2 Correct typo (fixes gh-87) 2013-10-11 08:23:26 -04:00
Dave Syer cd5bc83533 Fix build some more after changes for gh-84 2013-10-10 16:47:11 -04:00
Dave Syer a48990f2d4 Add spring-boot-starter-test
[Fixes #56467326] [bs-314]
2013-10-10 15:47:02 -04:00
Dave Syer 228787e66d Fix build after changes for gh-84 2013-10-10 14:48:37 -04:00
Dave Syer 26f3379d1a Add mongodb to travis CI 2013-10-10 13:43:13 -04:00
Dave Syer d60ba48de0 Fix bug in RelaxedPropertyResolver with prefix ending in separator
E.g. with a prefix spring.jpa.hibernate. we want naming-strategy and
namingstrategy to be resolvable. It wasn't working before this change
because the whole property path was being manipulated, where you
actually need to manipulate the prefix and suffix separately.
2013-10-10 13:15:21 -04:00
Dave Syer 68da5b41c6 Allow relaxed names to include prefixes 2013-10-10 13:15:21 -04:00
Dave Syer a7d12bfddb Add FileEncodingApplicationContextInitializer
Looks for spring.mandatory_file_encoding and matches it against
System.getProperty("file.encoding").

Fixes gh-46
2013-10-10 13:15:21 -04:00
Dave Syer b8bdf22209 Don't repeat relaxed names that already showed up 2013-10-10 13:15:21 -04:00
Andy Wilkinson 97f93bfa64 Support simple @Grab annotations everywhere
Previously, simple @Grab annotations only worked on classes. This commit
updates the simple @Grab support so that they can be used on anything
that can be annotated with @Grab.

The simplified @Grab support relies upon springcli.properties having
been generated. This commit adds an M2E lifecycle mapping for the
antrun plugin so that springcli.properties is generated as part of an
Eclipse build, thereby making it easier to run tests in Eclipse that
rely upon the simplified @Grab support.
2013-10-10 16:57:13 +01:00
Dave Syer 0ec2d19e38 Add spring.thymeleaf.encoding to ThymeleafAutoConfiguration
Both the template resolver and the view resolver now have their
encoding set explicitly (defaulting to UTF-8).

Fixes gh-79
2013-10-10 09:58:09 -04:00
Dave Syer 2c60828cf2 Ensure ServerProperties default values does not override
Since ServerProperties had primitive properties for port (in
particular) it was not possible to check when applying those
properties if the user had actually changed the value. This
in turn meant that a custom EmbeddedServletContainerFactory
could not set the default values.

Fixed by making int properties of ServerProperties into
Integer and checking for null before setting on the
container factory.

Fixes gh-84
2013-10-10 09:46:14 -04:00
Andy Wilkinson b855ab6cae Treat Maven artifacts with bundle packaging as jars
Previously, LocalM2Resource used the pom's packaging configuration to
determine the suffix of the file that it should look for, e.g. if
the pom's packaging was jar, it would look for a file with a .jar
suffix in artifactExists(). This logic fails for artifacts with bundle
packaging as it would look for a .bundle file rather than a .jar file,
fail to find the file, and incorrectly report that the artifact does not
exist.

This commit updates LocalM2Resource to look for a file with a .jar
suffix when the packaging configuration in the pom is bundle.
2013-10-10 14:42:28 +01:00
Phillip Webb 35ff983b40 Prevent duplicate resource enumeration form loader
Fix LaunchedURLClassLoader to only enumerate resources from the
rootLoader and the URLs.

Commit cd2c189 (Support javaagent instrumentation with loader) added
a parent classloader and used filtering in the loadClass() method
to ensure classes were loaded from the appropriate location. The change
in parent means that locally packaged resources are found twice, once
from the parent, and once from the self archive URL.

LaunchedURLClassLoader now overrides getResource and getResources to
filter out the parent classloader and instead only add resources from
the root classloader and the URLs.

Issue: #56232870
2013-10-09 11:09:03 -07:00
Dave Syer 64d9f4f18d Allow user to override static resource handler mappings
A new API in Spring allows us to check for existing mappings in the
resource handler registry
2013-10-09 13:13:39 -04:00
Dave Syer 9df0c9eb4a Fix paragraphs that ran together 2013-10-09 13:01:21 -04:00
Dave Syer 6bfc888a58 Remove missing links 2013-10-09 12:43:15 -04:00
Phillip Webb 33a597b661 Update homebrew location 2013-10-09 09:41:08 -07:00
Dave Syer bcfc134702 Add explicit header link 2013-10-09 11:59:33 -04:00
Dave Syer 3adfdd34ec Use simplified @Grab where possible 2013-10-09 10:16:01 -04:00
Dave Syer 1dd0cca294 Update M4->M5 in README 2013-10-09 09:04:39 -04:00
Phillip Webb af0d08c998 Polish 2013-10-08 21:17:39 -07:00
Phillip Webb b772f7c2e4 Polish
Minor formatting and consistent copyright header.
2013-10-08 20:30:45 -07:00
Phillip Webb 1a9ce42da9 Apply source formatting to samples 2013-10-08 20:25:10 -07:00
Phillip Webb efe102bd51 Polish CLI tester code
Reduce duplication by extracting FileOptions class to be shared by
both the RunCommand and the TestCommand.

Also applied minor code convention tweaks.
2013-10-08 20:22:59 -07:00
Dave Syer 910202b0f6 Fix build 2013-10-08 17:54:37 -04:00
Dave Syer ef17ff8d24 Adapt device change to new springcli.properties 2013-10-08 17:50:55 -04:00
Roy Clarkson 5cdaa43912 Add Spring Mobile Device Resolver autoconfiguration 2013-10-08 17:43:09 -04:00
Ulrich von Poblotzki f306eda703 Implemented the error handling in case of commucation failures 2013-10-08 17:38:43 -04:00
Ulrich von Poblotzki 386bb73169 Added simple error hangling to 'SnakeTimer#broadcast'
In some cases the websocket communication fails and Snake#sendMessage throws an exception.
In that case the send loop is interrupted and later clients are not update.
2013-10-08 17:38:42 -04:00
Dave Syer 84a213f774 Add README to cli 2013-10-08 16:27:47 -04:00
Dave Syer a72ab9eb7d Refactor cli properties into single project 2013-10-08 15:53:55 -04:00
Dave Syer b5f0f97110 Clean up TestCommand paraphenalia 2013-10-08 15:39:37 -04:00
Greg Turnquist 1ce13cc2c2 Add 'spring test [files]' command to compile and test code automatically
- Look for JUnit test symbols, and add JUnit automatically
- Look for Spock test symbols, and add Spock automatically
- Based on what test libraries were used, invoke relevant embedded testers
  and accumulate results
- Make it so that multiple testers can be invoked through a single 'test' command
- Print out total results and write out detailed trace errors in results.txt
- Update based on the new artifact resolution mechanism
2013-10-08 12:09:54 -05:00