Commit Graph

1244 Commits (56364ecd46ffe705c829b3874ca366c649f7b737)
 

Author SHA1 Message Date
Phillip Webb 56364ecd46 Allow custom PersistenceUnitManager with JPA
Allow JPA auto-configuration to use an optional custom
PersistenceUnitManager defined as a bean.

Fixed gh-238
11 years ago
Phillip Webb 096ace6896 Add @EntityScan annotation
Add an @EntityScan annotation that can be used to configure the
`packagesToScan` attribute on `LocalContainerEntityManagerFactoryBean`.

Fixed gh-239
11 years ago
Dave Syer 8db1d0e044 Fix some TODOs 11 years ago
Dave Syer 07da034571 Allow @EnableTransactionManagement to be supplied by user 11 years ago
Dave Syer e7675a0630 Add unit tests for YAML parsing errors
Test for gh-235
11 years ago
Phillip Webb 0a6074be6f Fix failing test due to cache timeout property
Related to gh-232
11 years ago
Christopher Smith 25cc68cafe Add spring.resources.cachePeriod to MvcAutoConfiguration
Fixes gh-232
11 years ago
Dave Syer 5627caa724 Move spring-boot tests utilities to main spring-boot.jar
Fixes gh-233
11 years ago
Dave Syer d53a52cf1a Fix test 11 years ago
Dave Syer d01bc59d7e Update to bootstrap 3.0.3 11 years ago
Dave Syer aded7435b5 Swicth to webjars for static sample 11 years ago
Dave Syer 559f907b54 Use explicit test dependencies in samples 11 years ago
Phillip Webb f103a976f8 Don't use @ComponentScan for default packages
Update the 'default' package used for @Entity and Repository scanning
to be the package of the class annotated with @EnableAutoConfiguration
rather than using @ComponentScan.

This allows JPA and Spring Data to be used without requiring component
scanning and also removes the confusion that could arise from reusing
the @ComponentScan annotation, which already has well defined semantics.

Fixes gh-200
11 years ago
Phillip Webb 6c255e5785 Reduce logging in Travis 11 years ago
Phillip Webb b85f984349 Refine auto-configuration report log levels
Refine the `AutoConfigurationReportLoggingInitializer` log level to
only display the information about enabling debug if the debug level
if not on.

Fixes gh-199
11 years ago
Phillip Webb 53f1488f70 Don't automatically log auto-configuration report
Update the `AutoConfigurationReportLoggingInitializer` to only output
the report at debug level. A crash report now triggers an info output
suggesting the user runs again with '--debug' to display the report.

Fixes gh-199
11 years ago
Phillip Webb c41a3fd5db Fail builds if multiple main classes are found
Update the maven and gradle plugins to fail the build if a single
unique main class cannot be found. Additionally plugins will warn
if the search is taking too long.

Fixes gh-210
11 years ago
Phillip Webb 312535bcd5 Add SpringNamingStrategy to improve FK names
Add a new `SpringNamingStrategy` hibernate `NamingStrategy` that
extends `ImprovedNamingStrategy` to improve the name of foreign
key columns.

Fixes gh-213
11 years ago
Phillip Webb 28a92d22dc Prevent CTRL-D from causing NPE in shell
Update the integrated shell to deal with a null line which can be
triggered with CTRL-D.

Fixes gh-229
11 years ago
Dave Syer 796816e8c3 Remove CleanCommand
Fixes gh-230
11 years ago
Phillip Webb c8a1d8830c Refactor CLI internals for REPL shell
Numerous updates to the Spring CLI, primarily for better embedded REPL
shell support:

* Refactor the CLI application to help separate concerts between the
  main CLI and the embedded shell. Both the CLI and embedded shell now
  delegate to a new `CommandRunner` to handle running commands. The
  runner can be configured differently depending depending on need.
  For example, the embedded shell adds the 'prompt' and 'clear'
  commands.

* Most `Command` implementations have been moved to sub-packages so that
  they can be co-located with the classes that they use.

* Option commands are now only used in the CLI, the embedded shell
  does not user them and details have been removed from the Command
  interface.

* The REPL shell has been significantly refactored to:
    - Support CTRL-C to cancel the running process. This is supported
      when running external commands and most internal commands.
    - Fork a new JVM when running commands (primarily for CTRL-C support
      but also for potential memory and classpath issues)
    - Change the "continue" trigger from `<<` to `\`
    - Support command completion of files
    - Add ANSI color output
    - Provide 'help' support for internal commands (such as 'clear')
    - Remove the now redundant `stop` command

Fixes gh-227
11 years ago
Phillip Webb cad9fbfdf0 Fix CLI help formatting issue with '-cp'
Ensure that '--cp' is replaced with a same length string to prevent
odd help text formatting.
11 years ago
Phillip Webb 4fc9dfc2d5 Revert "Add launcher.count as useful performance testing aid"
This reverts commit e1605b4691.
11 years ago
Phillip Webb 3b259bc865 Polish 11 years ago
Dave Syer 5592023f16 Add support for reloading resources in Gradle plugin
Usage:

$ gradle bootRun
...

Edit files in src/main/resources and see the changes live in a web app
(e.g. static resources in /static).

The old functionality of bootRun has been replaced (since it didn't add
a lot of value and also didn't expose any JMV argument setters of anything).
This new feature set is backed by any existing "run" task configuration.

In addition autodetects a main class if there is one in the project
sources, so no need for mainClassName = '...' in build.gradle.

Applies the 'application' plugin (so no need to declare that either).

Fixes gh-225
11 years ago
Andy Wilkinson 5fb42c3c33 Support @Grab when app has multiple groovy scripts
The AST transformation that processes @Grab annotations is driven once
per source file. Previously, this meant that if an app consisted of
multiple source files then multiple, discrete dependency resolutions
would be performed.

This commit updates AetherGrapeEngine to cache a previous resolution's
outcome and use its dependency to influence the outcome of subsequent
resolutions. For example if a one resolution results in spring-core
4.0.0.RELEASE being added to the classpath, subsequent resolutions
that depend upon spring-core will always get the 4.0.0.RELEASE
version. This is achieved by using the dependencies found by earlier
resolutions as dependency management configuration of the current
resolution. This removes the possibility of multiple versions of the
same dependency ending up on the classpath.

In addition to using the results of earlier resolutions to provide
dependency management configuration, default dependency management
configuration is also provided. This configuration is specified by
the springcli.properties file and ensures that, where Boot prescribes
certain versions of a dependency, that is the version that will be
resolved. For example, this ensures that spring-data-redis, which
depends upon Spring 3.1.4, pulls in the version of Spring that Boot
requires instead.

Fixes #224
11 years ago
Andy Wilkinson b45683f103 Only auto-configure Reduce if Lettuce is on the classpath
Fixes #226
11 years ago
Dave Syer 57ba6a40b6 Divert out/err streams while command runs
Actually System.in works fine, it's the output streams that get buffered.
We can fix it by diverting them for the duration of the command.

Fixes gh-217
11 years ago
Dave Syer 6b6bd37924 Add hint to user about 'stop' command
Improves gh-218
11 years ago
Dave Syer 1f5cba9e32 Clear prompt before clearing screen
Fixes gh-219
11 years ago
Dave Syer fa8e4768b9 Prevent JLine from expanding !history events
We might also want to rethink "!" as a shell exec command (since it means
something in a real shell and in JLine). E.g. use "exec" or something.

Partial fix for gh-220 (ideally we'd process the events and catch
and handle exceptions).
11 years ago
Dave Syer b07a1998df Remove InitCommand altogether
Related to gh-212
11 years ago
Dave Syer 8ff2a88712 Fix counting error in SourceOptions 11 years ago
Dave Syer a5f16d46fe Remove ScriptCommand support
InitCommand remains for now, so that you can @Grab a jar with
custom commands if you so choose.

Contributes to gh-212
11 years ago
Andy Wilkinson c921c9410b Improve startup failure diagnostics
A typical cause of startup failure is an incorrectly configured
classpath. Previously the classpath used to launch the application
wasn't easy for a user to discover. This made problem diagnosis
difficult. This commit adds an application listener that, in the event
of a start error, logs the thread context class loader's classpath at
INFO level. The classpath is also logged at DEBUG level when an
application starts successfully.
11 years ago
Dave Syer 3e6eb6fec8 Remove support for InitCommand outside REPL
In this commit we retain "init" as a command inside the ShellCommand
but not on the bash command line.

Seems to have an impact on performance so relevant to gh-212.
11 years ago
Dave Syer c43d91598e Update config location docs 11 years ago
Dave Syer 5b90e18564 More performance tweaks for SpringCli 11 years ago
Dave Syer e1605b4691 Add launcher.count as useful performance testing aid 11 years ago
Andy Wilkinson 895daacde9 Roll spring-boot-maven-settings into the CLI 11 years ago
Phillip Webb 719b47fad8 Polish 11 years ago
Phillip Webb e3b352e0b5 Support 'headless' applications
Update SpringApplication to run by default in 'headless' mode. This
prevents the AWT system from creating a Java icon (for example in the
OSX dock).

Also update builds to run tests in 'headless' mode.
11 years ago
Phillip Webb 0e413c3b48 Update to latest maven plugins 11 years ago
Phillip Webb ffe8bf5419 Remove unused .gitignore files 11 years ago
Phillip Webb 2f71f9fa4c Add main.basedir property 11 years ago
Andy Wilkinson e96fa79c31 Don't pull test and provided dependencies into the CLI jar 11 years ago
Dave Syer c9f8dac9d9 Typo in howto 11 years ago
Dave Syer 165ba2eb45 Add some performance tests for InitCommand
Fixed gh-212 again
11 years ago
Dave Syer dba6a5bfaf Add support for = separator in EnvironmentTestUtils 11 years ago
Dave Syer 577c177d6a Fix typo in EnvironmentTestUtils
Fixes gh-214
11 years ago