Commit Graph

614 Commits (bd15a0c03aa1a3aaa898865fa76b5fcaee50f993)

Author SHA1 Message Date
Phillip Webb 1ce617f1ae Polish sample package names 10 years ago
Phillip Webb c13ff96b78 Fix misnamed jOOQ sample module 10 years ago
Phillip Webb ab1cc829c1 Add jOOQ sample application
See gh-2804
10 years ago
Andy Wilkinson fd6d61e8b4 Add auto-configuration support for Spring Session
This commit adds support for automatically configuring Spring Session.
In a web application when both Spring Session and Spring Data Redis
are on the classpath, Spring Session's Redis Http Session support
will be auto-configured. The max inactive interval for Redis-backed
sessions can be configured via the environment using the existing
server.session-timeout property.

Closes gh-2318
10 years ago
Stephane Nicoll be5e30b409 Migrate spring.view properties
Migrate `spring.view.prefix` and `spring.view.suffix` to
`spring.mvc.view.prefix` and `spring.mvc.view.suffix` respectively. The
former properties are still handled in a backward compatible way and are
defined as deprecated in the meta-data.

Closes gh-3250
10 years ago
Phillip Webb 6b92160295 Enforce Java 8 for compiling 10 years ago
Phillip Webb dc071fa246 Restore remote support in devtools-sample 10 years ago
Phillip Webb b57802190d Polish 10 years ago
Phillip Webb 9929e39124 Allow devtools properties in `user.home`
Support loading a `.spring-boot-devtools.properties` file from the
users home folder. The property file can be used to customize settings
that make sense on a per-user basis, but might not want to be checked
into the project.

Fixes gh-3151
10 years ago
Phillip Webb d0349879c3 Allow custom restart pollInterval and quietPeriod
Allow the pollInterval and the quietPeriod of the filewatcher to be
configured.

Fixes gh-3139
10 years ago
Phillip Webb 7bcd6567ba Allow reload to use a trigger file
Update `FileSystemWatcher` to support the concept of a "trigger file"
which could be written by an IDE when a reload needs to occur.

Fixes gh-3157
10 years ago
Eddú Meléndez baca62a6c0 Fix typos 10 years ago
Phillip Webb 983484f429 Rename spring-boot-developer-tools -> devtools
Fixes gh-3099
10 years ago
Stephane Nicoll b847b6fa4b Fixup version numbers following release 10 years ago
Phillip Webb 09a29a7207 Polish OAuth SSO 10 years ago
Phillip Webb 31d6a0f17a Polish updated metrics code 10 years ago
Phillip Webb d2f11c465e Polish cache code 10 years ago
Phillip Webb 412b7b9e50 Polish 10 years ago
Spring Buildmaster 5d81c87b43 Next Development Version 10 years ago
Stephane Nicoll fca192fa41 Add spring-boot-starter-cache
Closes gh-3098
10 years ago
Phillip Webb 49c4710f63 Merge branch '1.2.x' 10 years ago
Phillip Webb 968b68c322 Polish 10 years ago
Phillip Webb 67cc9d007f Add a spring-boot-developer-tools sample
Add a sample application that demonstrates how the
`spring-boot-developer-tools` module can be used.

Closes gh-3082
10 years ago
Stephane Nicoll 18d7634947 Add basic cache metrics support for Infinispan
Closes gh-3066
10 years ago
Stephane Nicoll eef027a4f0 Polish cache sample
Update single cache sample with all supported cache providers. Add README
to shortly explain how to get started with them.

See gh-2633
10 years ago
Eddú Meléndez 23a278451a Add cache sample
See gh-2633
10 years ago
Dave Syer 8a83bd12bd Refactor annotations for metric export
Users can add @ExportMetric[Reader,Writer] to readers and writers that
they want to participate in the default exporter. There is also still an
@ActuatorMetricWriter that is used for the legacy (non-Java8) Gauge and
CounterServices.
10 years ago
Dave Syer 80ff92919c Add redis properties as convenience in spring.metrics.export
The redis export and aggregate use case is a lot nicer with this
shared data between the two component types.

Also made MetricExportProperties itself a Trigger (so the default
delay etc. can be configured via spring.metrics.export.*).
10 years ago
Alexander Heusingfeld 04776232f7 Allow auto-reload of log4j2 config
Log4j2 can auto-reload its configuration file as long as the reference
to a `java.io.File` is provided in the `ConfigurationSource`. Previously,
we always created such `ConfigurationSource` with only the URL regardless
of its type.

Detect when the configuration URL points to a File and create the
`ConfigurationSource` accordingly.

The `spring-boot-sample-actuator-log4j2` has been updated to reload the
logging configuration every 30 sec if necessary.

Fixes gh-3024, gh-3030
10 years ago
Dave Syer c5dc3f564b Add @EnableOAuth2Sso and spring.oauth2.sso.*
User can enable OAuth2 SSO by declaring the intent (@EnableOAuth2Sso)
and also configuring the client properties (spring.oauth2.client.*).
The spring.oauth2.sso.* are only needed to change the path for the
login (defaults to /login) - any other security configuration for the
protected resources can be added in a WebSecurityConfigurerAdapter
which carries the @EnableOAuth2Sso annotation.
10 years ago
Dave Syer af320b49bf Rationalize some features and merge in customizers from Spring Cloud 10 years ago
Greg Turnquist 53f67a448f Auto-configure Spring Security OAuth2 when detected on the classpath
* Automatically spin up Authorization Server and Resource Server
* Automatically configures method level security included OAuth2Expression handler
* Wrote extensive unit tests verifying default behavior as well as the auto-configuration backing off when custom Authorization/Resource servers are included
* Created org.springframework.boot.security.oauth2 subpackage to contain it
* Can also disable either resource of authorization server completely with a single property for each
* Print out the auto-generated secrets and other settings
* Added spring-boot-sample-secure-oauth2 to provide a sample that can be run and poked with curl as well as some automated tests.
* Make users ask for which servers to install by adding @Enable*
* User has to @EnableGlobalMethodSecurity instead of using properties files

Add Spring Security OAuth2 support to Spring Boot CLI

* Triggered from either @EnableAuthorizationServer or @EnableResourceServer
* Needs to have @EnableGlobalMethodSecurity to allow picking the annotation model.
* By default, comes with import support for @PreAuthorize, @PreFilter, @PostAuthorize, and @PostFilter via a single start import
* Also need import support for the enable annotations mentioned above.
* Added extra test case and sample (oauth2.groovy)
10 years ago
Andy Wilkinson 95f31b0d30 Polish Undertow access logs contribution
- Apply project’s code formatting and conventions
 - Don’t use the IO and worker thread configuration when creating the
   worker for the AccessLogReceiver. The IO and worker thread
   configuration is for HTTP request processing and a worker in its
   default configuration should be sufficient for the access log
   receiver.
 - Don’t use a temporary directory as the default for the access log
   directory. A temporary directory makes (some) sense for Tomcat as it
   requires a directory for its basedir. Undertow has no such
   requirement and using a temporary directory makes it hard to locate
   the logs. The default has been updated to a directory named logs,
   created in the current working directory.
 - Document the new properties in the application properties appendix

Closes gh-3014
10 years ago
Marcos Barbero 90e43737bb Add support for configuring Undertow's access log via the environment
This commit adds support for configuring Undertow's access log via the
environment using the following properties:

server.undertow.access-log-enabled
server.undertow.access-log-pattern
server.undertow.access-log-dir

See gh-3014
10 years ago
Dave Syer 64af3272a1 Extract metric export into a separate autoconfig class
This avoids a potential problems with ordering between Dropwizard and
normal repository configuration. A Dropwizard sample has been added to
verify the behaviour.
10 years ago
Dave Syer 7be13b28bd Add tests for new features 10 years ago
Dave Syer 270d5e3205 Add @ActuatorMetricRepository to qualify the "native" repository
Primarily when it is needed for metric export.
10 years ago
Dave Syer 0ce72105b9 Add JMX to Redis sample 10 years ago
Dave Syer 3fda744522 Add samples and tweak metrics reader/writers till they work 10 years ago
Dave Syer 60a4943520 Add support for metric export to OpenTSDB 10 years ago
Dave Syer 18928a62df Add sample for Redis metric exporter 10 years ago
Andy Wilkinson 681894a1f3 Start building against Spring Integration 4.2.0 snapshots
See gh-2883
10 years ago
Andy Wilkinson 6847608308 Merge branch '1.2.x'
In addition to the changes already made in 1.2.x, this commit updates
the tests in spring-boot-actuator to ensure that any Elasticsearch
data files are written into the target directory. This avoids problems
when switching branches caused by different versions of Elasticsearch
trying to read the files.
10 years ago
Andy Wilkinson dabbb02dfe Prevents tests that use Elasticsearch from polluting the filesystem
By default, Elasticsearch writes it data to ./data. This led to data
being left on the filesystem after a mvn clean which could cause
failures when moving between branches that use different versions of
Elasticsearch.

This commit updates the tests for the Elasticsearch sample and
the Elasticsearch auto-configuration classes to write the
Elasticsearch data and logs into the target directory.
10 years ago
Andy Wilkinson 4452bb1873 Revert "Upgrade Gradle plugin’s ID so it’s suitable for the Plugin Portal"
This reverts commit b1c0a7cda4.

The plugin publishing process has moved to a new plugin-based approach
that brings with it some significant limitations:

 - There's no staging to allow the promotion of good release builds
 - There's no easy way to upload an existing artifact
 - There's no control over the published pom.

The risk brought by these limitations, particularly the first, are
too great so we will no be publishing the Boot plugin to the Portal
until they're resolved.

Changing the plugin's ID was a breaking change that would require
users to do some work when they upgrade to Boot 1.3. The ID of the
plugin was changed purely so that it met the Portal's requirements.
Given that the plugin will not be published to the Portal for the
foreseaable future there's no need for us to inflict a breaking change
on people when there will be no benefit.

See gh-1567
10 years ago
Andy Wilkinson 2085a5b0cf Work around the behaviour change in latest Spring 4.2 snapshots
The changes made in spring-projects/spring-framework@e403aefe cause
SampleTomcatTwoConnectorsApplication to fail to launch. The port bean,
typed as an int, is coerced into an Integer when the bean’s created. The
port() method is then called, and the proxy’s bean method interceptor
complains as it’s expecting the port bean to be an int but it’s actually
an Integer. Changing the port() bean method’s return type to Integer
works around the problem.
10 years ago
Andy Wilkinson d13878e193 Upgrade to Spring Data Fowler RELEASE
The versions in the dependency management for the various datastore
dependencies have been aligned with those used by Spring Data Fowler.

The Data REST tests and sample application has been updated to configure
the base path in favour of the deprecated base uri property

Closes gh-2673
10 years ago
Andy Wilkinson 8b1022effa Upgrade to Spring Batch 3.0.4 snapshots
Closes gh-2712
10 years ago
Phillip Webb 42e69359a8 Fixup version numbers following release 10 years ago
Spring Buildmaster e03c11dda8 Next development version 10 years ago
Andy Wilkinson bc99ad2120 Ignore Batch tests that use JDBC as they don’t work with Spring 4.2
Spring Framework’s ParamterizedRowMapper has been deprecated since
3.1 and has been removed in 4.2. Spring Batch currently relies on
ParameterizedRowMapper, making it incompatible with 4.2. To allow us to
build successfully against 4.2, this commit ignores Spring Boot’s tests
that use Spring Batch’s JDBC support.

See gh-2575
10 years ago
Phillip Webb 53ca15b478 Polish spring-boot-sample-activemq 10 years ago
Stephane Nicoll 6488659d40 Add link to activemq sample. 10 years ago
Andy Wilkinson b1c0a7cda4 Upgrade Gradle plugin’s ID so it’s suitable for the Plugin Portal
Gradle’s plugin portal requires each plugin’s ID to be in a namespace.
Our existing ID, spring-boot, does not meet this requirement. This
commit changes the plugin’s ID to org.springframework.boot.spring-boot.
Note that, as is recommended [1], the plugin’s ID does not include
“gradle”.

See gh-1567

[1] http://plugins.gradle.org/submit
10 years ago
Andy Wilkinson cb067ee00c Align expectations with Spring Data REST’s new behaviour in Fowler
The response produced by Spring Data REST to a search that will always
return a single result, i.e. the return type is Foo rather than
List<Foo> or Page<Foo> has improved in Fowler. Previously, the response
would contain a single embedded resource. In Fowler, the response now
contains the resource that used to be embedded as a top-level resource.
This commit updates the expectations in one of the sample’s tests to
match this new behaviour.

See gh-2673
10 years ago
Dave Syer 2105be2358 Merge branch '1.2.x' 10 years ago
Dave Syer c153c4e517 Make tomcat provided in a war sample 10 years ago
Eddú Meléndez 3bd1ec680e add spring-boot-sample-activemq 10 years ago
Phillip Webb 0174476ff1 Merge branch '1.1.x' into 1.2.x 10 years ago
Phillip Webb 50e1f80581 Remove .factorypath files 10 years ago
Phillip Webb 561ed99b5b Merge branch '1.1.x' into 1.2.x 10 years ago
Phillip Webb 3048f44a96 Move master to 1.3.0.BUILD-SNAPSHOT 10 years ago
Phillip Webb a57a88f5cf Move master to 1.3.0.BUILD-SNAPSHOT 10 years ago
Phillip Webb 8ce39bda88 Fixup version numbers following release 10 years ago
Spring Buildmaster 8f0ad02237 Next development version 10 years ago
Phillip Webb 8a49218e82 Fixup version numbers following release 10 years ago
Spring Buildmaster aea68f0c32 Next development version 10 years ago
Phillip Webb a1cbd93d6b Ensure local Elasticsearch nodes are closed
Update ElasticsearchAutoConfiguration to ensure that local nodes are
closed when the context is closed. Prior to this commit the close()
method of the Client would be called which had no effect for local
Nodes.

Fixes gh-2480
10 years ago
Phillip Webb 4cac9d7382 Ensure actuator works without Spring MVC
Update MetricFilterAutoConfiguration to ensure that it is only applied
if Spring MVC is on the classpath.

Fixes gh-2542
10 years ago
Phillip Webb 8e594c790e Fix eclipse errors and warnings
Fix some eclipse errors and warnings caused by XSD validation errors and
classes in the wrong place.
10 years ago
Andy Wilkinson 17fd3d44b7 Add workaround for Undertow WebSocket client sending illegal Origin
Undertow’s WebSocket client sends an illegal Origin header – it does
not include the scheme, e.g. it’ll send “localhost” rather than
“http://localhost”. This commit works around the problem by allowing
access to the SockJS endpoints from any origin, thereby disabling
OriginHandlerInterceptor’s checking of the Origin header.
10 years ago
Andy Wilkinson d87bf707a7 Merge branch '1.1.x' 10 years ago
Phillip Webb 636898f9ad Polish 10 years ago
Stephane Nicoll dfdb801533 Fix use of deprecated API. 10 years ago
Andy Wilkinson c9186c45a2 Merge branch '1.1.x' 10 years ago
Andy Wilkinson c346e996ed Ignore temporary .writing files when finding output files
Spring Integration's FileWritingMessageHandler uses a .writing file
while it's in the process of writing a message to disk and then
performs a rename (depending on the OS and filesystem this may or may
not be atommic) to create the .msg file. Prior to this commit the
test was finding the temporary .writing files and examining them. This
could lead to a FileNotFoundException being thrown as the temporary
file was deleted while the test was trying to read its contents.

This commit updates the test to only look for files with a .msg suffix

Fixes gh-2428
10 years ago
Andy Wilkinson 8e8bf8e177 Uses the latest version of Tomcat 7 in the sample 10 years ago
Andy Wilkinson 01344c8617 Add a starter for building a RESTful service with Spring HATEOAS
Closes gh-2396
10 years ago
Andy Wilkinson f0421801fb Update spring-boot-sample-tomcat-jsp to use Tomcat 8
Closes gh-2394
10 years ago
Andy Wilkinson 247c596f8c Remove duplicate console appender from Actuator sample's logback config
Closes gh-2381
10 years ago
Andy Wilkinson 1d312171c1 Merge branch '1.1.x' 10 years ago
Andy Wilkinson f10c9b5312 Avoid race between file creation and its contents being written
Previously, SampleIntegrationParentApplicationTests assumed that when
an output file existed on disk its contents would have been written
in their entirety. This assumption does not hold true and causes the
test to fail intermittently as it incorrectly determines that the test
has produced no output.

This commit updates the test to wait for up to 30 seconds for the
output files to appear on disk and for the expected content to be
found in one of those files. If the files exist but do not
contain the expected content the test will keep trying until it does
or until too much time as elapsed.

Fixes gh-2380
10 years ago
Andy Wilkinson e19bfd9251 Document how to use Tomcat 7 or Jetty 8 with Gradle
Previously, the documentation only provided examples of the required
configuration for Maven users. This commit adds equivalent configuration
snippets for those using Gradle. It also removes the recommendation to
override the version of the Servlet API as this is unnecessary. The pom
files for the Jetty 8 and Tomcat 7 samples have also been updated
accordingly.

Closes gh-2346
10 years ago
Andy Wilkinson ff2d423fcb Correct the root context path used with Undertow
Undertow, like Tomcat, uses "" for the context path of the root
context. Previously, the Undertow deployment was being configured with
"/" for the root context. This was leading to a silent failure in
AsyncContextImpl.dispatch when it failed to look up the deployment
manager for the current request.

This commit updates UndertowEmbeddedServletContainerFactory to use the
correct context path (an empty String) for the root context.

Fixes gh-2365
10 years ago
Andy Wilkinson 492cf4ef54 Add jersey-bean-validation to spring-boot-starter-jersey
A dependency on org.glassfish.jersey.ext:jersey-bean-validation has
been added to spring-boot-starter-jersey. jersey-bean-validation’s EL
dependencies have been excluded in favour of those provided by
spring-boot-starter-tomcat (or starter-jetty or starter-undertow should
the user choose to use a different embedded container).

Closes gh-2315
10 years ago
Phillip Webb 43d577aa4c Add Atmosphere sample application
Add Atmosphere example application based on
http://github.com/Atmosphere/atmosphere-samples/tree/master/samples/chat

Closes gh-2341
10 years ago
izeye 4e109caf5c Fix copy/paste errors
Closes gh-2323
10 years ago
Dave Syer 2729c747ca Add jmustache support
The package names changed a bit from the prototype project, but wuth vanilla
autconfiguration usage that shouldn't matter. Follows closely the Groovy
templates support. Templates live in classpath:/templates/*.html by default.

Fixes gh-2242
10 years ago
Phillip Webb 9dd4d43cec Fixup version numbers following release 10 years ago
Spring Buildmaster 60725cd8bd Next development version 10 years ago
Phillip Webb 978cf8c2e6 Polish @WebIntegrationTest support
See gh-2299
10 years ago
Phillip Webb f9c3baed33 Add TestNG sample application
Add a TestNG sample that also demonstrates @WebIntegrationTest.

See gh-2135
10 years ago
Phillip Webb 98135c964b Remove Principal handler logic from security
Update ManagementSecurityAutoConfiguration so that MVC Endpoints that
have Principal arguments are not treated in any special way. This
restores Spring Boot 1.1.x behavior where the 'sensitive' flag is used
to determine access rules.

The HealthMvcEndpoint still uses the Principal (when available) to
determine if full status information can be displayed. It now also
explicitly checks the environment for `endpoints.health.sensitive`
to determine if the user has opted-out and requires complete health
details.

The health MVC endpoint should now work as follows:

* Default configuration - No login is required, full information is only
  displayed if a Principal is available.
* endpoints.health.sensitive=true - Login is required, full information
  is displayed.
* endpoints.health.sensitive=false - Login is not required, full
  information is displayed.

Fixes gh-2211
10 years ago
Phillip Webb ea84479e9a Fix HATEOAS sample application version number 10 years ago
Phillip Webb 4ed42aac37 Merge branch '1.1.x' 10 years ago
Phillip Webb 7d017a2a6b Add HATEOAS sample application 10 years ago
Phillip Webb 425f989a26 Polish velocity sample POM name 10 years ago
Phillip Webb 5afd0b4858 Polish sample POM names 10 years ago
Phillip Webb 8fd99bde8b Update samples to use specific log configuration 10 years ago
Phillip Webb a6adeab319 Fixup version numbers following release 10 years ago