Commit Graph

3402 Commits (3e1841a53bec07fa663e44fed5cc7a9b468c1337)
 

Author SHA1 Message Date
Phillip Webb d6f2f0deee Merge branch '1.1.x' 10 years ago
Phillip Webb 5f80f3556b Use more specific WebSecurityConfigurer @Bean type
Update ManagementSecurityAutoConfiguration to return
IgnoredPathsWebSecurityConfigurerAdapter rather than
WebSecurityConfigurer<WebSecurity>.
10 years ago
Phillip Webb a490aef888 Merge remote-tracking branch 'springsource/1.1.x'
Conflicts:
	spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java
10 years ago
Phillip Webb 8ba71c88f5 Polish 10 years ago
Dave Syer b20d02a31d Make a lazy AuthenticationManager if we think it's already configured
Instead of just blindly creating the default authentication manager, after
thic change we count the beans of type GlobalAuthenticationManagerConfigurer
and assume that if we detect more than we expect (one from Boot and one from
Spring Security) then the user is telling us they want to configure the
AuthenticationManager themselves.

Fixes gh-1801
10 years ago
Phillip Webb aa2e32a041 Restore CLI startup performance
Change InitializrService to use a late binding CloseableHttpClient
since the calling `HttpClientBuilder.create().build()` is slow.

Fixes gh-1764
10 years ago
Phillip Webb 830ce80824 Polish CLI init command
Rename a few classes and methods and extract some logic into helper
classes. Also change 2 char shortcuts to a single char.

Closes gh-1751
10 years ago
Phillip Webb b89e5e0ab7 Apply eclipse formatting rules
Apply eclipse formatting rules to b2fe2dd9.

See gh-1751
10 years ago
Phillip Webb 8e16dfc951 Polish 10 years ago
Dave Syer f15cb7a720 Add tests for AuthenticationManager injected into security configurer
See gh-1801
10 years ago
Dave Syer 49fbf215a1 Switch to Dropwizard metrics 3.1.0
Fixes gh-1775
10 years ago
Dave Syer afb7156804 Add missing method for Java 1.7 10 years ago
Dave Syer a284d7bd3f Add Codahale metrics to /metrics endpoint
All metrics in the MetricRegistry have been added unconditionally for now.

Fixes gh-1795
10 years ago
Stephane Nicoll b2fe2dd912 Add init command to the CLI
This commit adds a new command to the CLI that allows to initialize a new
project from the command line. It uses the Spring initializr service to
actually generate the project.

The command offers two main operations:

1. Listing the capabilities of the service (--list or -l). This basically
dumps the defaults of a given service and the list of dependencies and
project types it supports
2. Generating a project. By default, http://start.spring.io is used and
its configured defaults are applied. Running spring init would therefore
have the same effect as clicking the 'generate project' on the UI without
entering any extra information. No file is overwritten by default.

The generation can be customized with the following options:

* --boot-version (-bv) Spring Boot version the project should use
* --dependencies (-d) comma separated list of dependencies to add to the
generated project
* --java-version (-jv) Java version to use
* --packaging (-p) the packaging for the project (jar, war)
* --target the url of the service to use

The actual type of the project can be defined in several ways:

1. Using the --type (-t) option that identifies a type that is supported
by the service
2. A combination of --build and/or --format that can be used to uniquely
identify matching these tags. Build represents the build system to use
(e.g. maven or gradle) while --format defines the format of the generated
project.

The project is saved on disk with the name provided by the server through
the Content-Disposition header, if any. It is possible to force it with
the --output option. It is possible to overwrite existing files by adding
the --force (-f) flag.

The --extract (-x) option allows to extract the project instead of saving
the zip archive. By default, the project is extracted in the current
working directory but it is possible to specify an alternate directory
using the --output option.

Fixes gh-1751
10 years ago
Phillip Webb 4b45ce9e57 Upgrade to Spring 4.1.2.BUILD-SNAPSHOT 10 years ago
Phillip Webb 931add4a7d Programmatically configure logback defaults
Update LogbackLoggingSystem to programmatically configure logback
defaults rather than parsing XML. This change shaves about 100ms off
the start up time.

Fixes gh-1796
10 years ago
Andy Wilkinson 36ffad2bb7 Merge branch '1.1.x' 10 years ago
Andy Wilkinson 0f17142366 Make GroovyWebConfiguration conditional on spring-webmvc's availability
GroovyWebConfiguration creates a GroovyTemplateViewResolver which is
a UrlBasedViewResolver sub-class. UrlBasedViewResolver is provided
by spring-webmvc. Previously, if a user configured a web application
but did not have spring-webmvc on the classpath, the application
would fail to start with a NoClassDefFoundError for
UrlBasedViewResolver.

This commit makes GroovyWebConfiguration conditional on
UrlBasedViewResolver being on the classpath so that it backs of in
the absence of spring-webmvc.

Fixes gh-1793
10 years ago
Andy Wilkinson 0cdb1d3f22 Make Spring Security's filter's order configurable and default to zero
Previously, Spring Security's filter had no configured order. Due to
the use of AnnotationAwareOrderComparater this meant that its order
defaulted to LOWEST_PRECEDENCE. This meant that a user had to declare
a FilterRegistrationBean for the filter and explicitly set its order
if they want another filter to run after Spring Security's.

This commit updates the security auto-configuration to assign a
default order of zero to Spring Security's filter, allowing filters
to be easily configured to run before it or after it. This default
value can overridden using the server.filter-order property. The
default order is also exposed as a constant on SecurityProperties,
allowing it to be referenced from other filter declarations.

Closes gh-1640
10 years ago
Phillip Webb cf24af0bfb Rework logging to prevent double initialization
Prior to this commit LoggingSystem initialization would happen multiple
times. Once to configure "quiet" logging, and again to configure correct
settings once the Application was initialized. This could cause problems
if `logging.groovy` logback files were used.

The logging system is now only initialized once (when possible) by
following these steps:

- Standard logging initialization occurs via the actual logging
  implementation used (e.g. logback will load a logback.xml file if it
  exists)
- beforeInitization() is called to prevent early log output.
  Implementations now either use a Filter or simply set the root logging
  level.
- initialize() is called with an optional log configuration file (e.g
  a custom logback.xml location) and an optional log output file (the
  default is null indicating console only output).

The initialize() method will attempt to prevent double initialization
by checking if a standard configuration file exists. Double
initialization now only occurs in the following situations:

- The user has a standard configuration file (e.g. classpath:logback.xml)
  but also specifies a logging.config property. Double initialization is
  required since the specified configuration file supersedes the default.
- The user has a standard configuration file (e.g. classpath:logback.xml)
  and specifies a logging.file property. Double initialization is
  required since the standard configuration may use a ${LOG_FILE}
  reference.

In addition this commit removes the `logging.console` option and now
assumes that logging either occurs only to console or to both the
console and a file. This restriction helps simplify the LoggingSystem
implementations. If file only logging is required a custom logback.xml
can be used.

Fixes gh-1091
See gh-1612, gh-1770
10 years ago
Phillip Webb d17b7c8195 Polish 10 years ago
Andy Wilkinson 466ed469eb Merge branch '1.1.x' 10 years ago
Andy Wilkinson e2dd659dd1 Include condition's location (class or method name) in message
Closes gh-1787
10 years ago
Andy Wilkinson c8d7a6dc24 Merge branch '1.1.x' 10 years ago
Andy Wilkinson 9a491013c3 Update email addresses in pom files to use new pivotal.io domain
Closes gh-1774
10 years ago
Andy Wilkinson 8a1e010d0a Allow multiple templateLoaderPaths to be configured for FreeMarker
Closes gh-1767
10 years ago
Andy Wilkinson ef2455938e Align new JavaMail dependencies with Spring IO Platform
Spring IO Platform already provides dependency management for JavaMail.
This commit updates Boot’s new JavaMail dependency management to align
with the Platform, thereby allowing the Platform to inherit Boot’s
dependency management instead of defining its own.
10 years ago
Stephane Nicoll 429da743f5 Add missing close 10 years ago
Stephane Nicoll ccc5e65779 Add email support
This commit adds a new starter to auto-configure a MailSender when the
necessary classes are present and when the property "spring.mail.host" is
set.

The auto-configuration also accepts any arbitrary properties that
JavaMail might need using the "spring.mail.properties" prefix.

Fixes gh-1760
10 years ago
Dave Syer 6ed2c65852 More testing of context hierarchy creation
There actually isn't anything much we can (or should) change here. Spring always
copies PropertySources and profiles down into the child context when you set its parent.
That seems sensible. So you can add a new profile in a child context but it will always
"inherit" from its parent.

See gh-1776
10 years ago
Stephane Nicoll 1709e79cb6 Merge pull request #1763 from sdeleuze/whitelabel-typo
* whitelabel-typo:
  Fix a typo in error.whitelabel.enabled
10 years ago
Sebastien Deleuze 7546f10aad Fix a typo in error.whitelabel.enabled 10 years ago
Andy Wilkinson 741d1f7273 Merge branch '1.1.x'
Conflicts:
	spring-boot-dependencies/pom.xml
10 years ago
Andy Wilkinson 812acec48f Upgrade to Spring Batch 3.0.2.RELEASE
Closes gh-1782
10 years ago
Andy Wilkinson b1e7cd0be2 Rename spring-boot-starter-cloud in spring-boot-dependencies
Fixes #1781
10 years ago
Andy Wilkinson 15a3a21417 Ignore JUL logging tests that only fail on Bamboo 10 years ago
Dave Syer af2a867d14 Remove missing module from pom (thanks Eclipse) 10 years ago
Andy Wilkinson d71afe0918 Remove redundant reference to renamed spring-boot-starter-cloud module 10 years ago
Dave Syer e2f2099197 Add test for gh-1776 10 years ago
Dave Syer b95e6fce6b Add 'Connectors' to project name 10 years ago
Dave Syer 7fa372555b Add @SuppressWarnings('serial') 10 years ago
Dave Syer 015377f9de Exclude log4j in a couple of places (see gh-1660)
also rename spring-cloud starter
10 years ago
Andy Wilkinson 0b116a1a5a Increase the level of JUL logging calls in the tests to try to fix CI
The CI build is failing, but, for some reason, the same tests are
working fine on developer machines. This commit increases the level
at which the logging calls are being made to severe in the hope that
some CI-specific configuration is filtering out the calls when
they're at info level.
10 years ago
Christian Dupuis 6c66ff78c0 Fix health status aggregation bug 10 years ago
Andy Wilkinson cebfd44d16 Upgrade to Spring AMQP 1.4.0.RC1 10 years ago
Andy Wilkinson bd562c06b6 Merge branch '1.1.x' 10 years ago
Andy Wilkinson f58b8366e1 Correct the syntax that's used for smart single and double quotes
Fixes gh-1753
10 years ago
Dave Syer aec38566ea Simplify logic for locating default logging config
Fixes gh-1612, Fixes gh-1770
10 years ago
David Liu 11c1e5ed6b add for log4j2 10 years ago
David Liu f9566ed30f spring-boot-1612: make console and file output configurable
1 disable the file output unless LOG_FILE is set
2 make the console optional

fixes: gh-1612
10 years ago