Commit Graph

710 Commits (ac5c6f725c0b00d1a5c5d37b155fc7b8e073cffe)

Author SHA1 Message Date
Phillip Webb d84889b03c Revert "Compile samples and integration tests with Java 8"
This reverts commit 09395f956a.
9 years ago
Phillip Webb 5392c0a52b Merge remote-tracking branch 'springsource/1.2.x' 9 years ago
Phillip Webb 56643222cf Add simple war sample 9 years ago
Wallace Wadge e3315d2252 Allow TraceWebFilter to trace more attributes
Update TraceWebFilter to optionally trace more details from the
HttpServletRequest/HttpServletResponse. The `management.trace.include`
property can be used to change what aspects are logged.

Closes gh-3948
9 years ago
Andy Wilkinson 995ff66eae Configure m2e to ignore reserve-network-port in Cassandra sample 9 years ago
Stephane Nicoll 01b23c886f Use random port for Cassandra tests
Closes gh-4028
9 years ago
Andy Wilkinson 8ee8c9fe90 Merge branch '1.2.x' 9 years ago
Andy Wilkinson d33d068fae Upgrade to Tomcat 8.0.28 and test support for SSL config from classpath
Prior to 8.0.28 Tomcat required the key store and trust store (if any)
to be available directly on the filesystem, i.e. classpath: resources
would not work. Tomcat 8.0.28 removed this limitation.

This commit updates to Tomcat 8.0.28, updates the tests to verify
the new Tomcat capability and removes the obsolete documentation of
the restriction.

Closes gh-4048
9 years ago
Phillip Webb aae38db9af Fix compiler warnings only shown in Eclipse Mars 9 years ago
Phillip Webb a0fc90a5ec Compile samples and integration tests with Java 8
Update the samples and integration tests to use Java 8. There's no
specific reason to keep them on Java 6 and it helps keep Eclipse happy
if we upgrade.
9 years ago
Phillip Webb c9fb9916b8 Reformat code using Eclipse Mars 9 years ago
Phillip Webb e473364e4e Merge branch '1.2.x' 9 years ago
Phillip Webb 6ab376e2e8 Reformat code use Eclipse Mars 9 years ago
Phillip Webb 47576354f7 Merge branch '1.2.x' 9 years ago
Phillip Webb 09395f956a Compile samples and integration tests with Java 8
Update the samples and integration tests to use Java 8. There's no
specific reason to keep them on Java 6 and it helps keep Eclipse happy
if we upgrade.
9 years ago
Andy Wilkinson cff1eea4c4 Make new configuration inner class static
See gh-4079
9 years ago
Phillip Webb c3b7764b72 Polish 9 years ago
Andy Wilkinson 2b748a7b44 Fix SampleOAuth2SsoApplicationTests
The redirect happens in two stages, first from / to /login on localhost
and then to github.com. This commit updates the test to check that the
first redirect has worked, i.e. from / to /login on localhost.
9 years ago
Dave Syer 67a70571de Add simple SSO sample with github authentication 9 years ago
Stephane Nicoll b2c3e7e2ed Rename error.* properties to server.error.*
Closes gh-4050
9 years ago
Dave Syer c8ec2cb70b Add missing annotation to openTSDB sample 9 years ago
Phillip Webb 31f0c837fd Fix broken Cassandra sample tests
See gh-2064
9 years ago
Julien Dubois c401330901 Add Cassandra support
Add auto-configuration support and health checks for Cassandra and
Spring Data Cassandra.

Fixes gh-2064
Closes gh-2214
9 years ago
Ivan Chen 926b40e46c Delete duplicate application.properties
Closes gh-4004
9 years ago
Phillip Webb d22d0683b2 Fixup build following release 9 years ago
Spring Buildmaster 9409c49c10 Next development version 9 years ago
Phillip Webb 3444ebbc05 Merge branch '1.2.x' 9 years ago
Phillip Webb 5f250ebbc1 Add exception endpoints to tomcat-jsp sample
Update `spring-boot-sample-tomcat-jsp` to include endpoints that trigger
exceptions. Primarily to aid testing of the ErrorPageFilter.

See gh-2745
9 years ago
Stephane Nicoll 0d2797ddd5 Polish contribution
Closes gh-3936
9 years ago
Eddú Meléndez 591f016e90 Expose actuator endpoints for flyway and liquibase
Update the samples to expose the relevant actuator endpoint.

Closes gh-3935
9 years ago
Phillip Webb 3174f898c6 Fix failing logback test
See gh-3924
9 years ago
Phillip Webb d09805fd75 Polish license headers 9 years ago
Phillip Webb 1983b43830 Polish POM descriptions 9 years ago
Phillip Webb 67402405db Reformat code 9 years ago
Phillip Webb 2615990ffb Organize imports 9 years ago
Phillip Webb 0335053139 Merge branch '1.2.x' 9 years ago
Phillip Webb 15686ed4fd Reformat code 9 years ago
Phillip Webb 0f6b60d8c8 Organize imports 9 years ago
Phillip Webb 026c3019df Polish 9 years ago
Stephane Nicoll f7a1db8e25 Polish 9 years ago
Stephane Nicoll 5453f7c59c Fix broken build
Commit c85f4df0ee broke the build as some tests are expecting HSQL to be
used. We now specify the name of the database rather than specifying the
jdbc url.
9 years ago
Stephane Nicoll c85f4df0ee Polish
Upgrade sample to use H2 and expose the web console by default.
9 years ago
Phillip Webb f4dcef281c Merge branch '1.2.x' 9 years ago
Phillip Webb feb2452f06 Simplify WebApplicationContext class guard
See gh-3856
9 years ago
Phillip Webb 6193b640a4 Polish 9 years ago
herau c379caadef Fix sample links
Closes gh-3844
9 years ago
Dave Syer ff681adc5b Fix launch.script to not exit prematurely
Use "return" instead of "exit" where possible, especially in
function definitions.

Also fixed the exit codes to match the LSB spec for some specific
conditions (fixes gh-3521).

Fixes gh-3199, fixes gh-3535
9 years ago
Stephane Nicoll 63d157bb7c Favor JSR-107 provider if present
Previously, native cache libraries were favored over a standard JSR-107
implementation. If a user has a working setup using JCache with one
provider and switch to another provider, his setup may be broken if we
happen to provide a native support for the new provider.

We now consistently favor JSR-107 if it is present. Native support can
still be enabled via the `spring.cache.type` property.

Closes gh-3822
9 years ago
Stephane Nicoll 1dfa1fc3a5 Polish
Closes gh-3800
9 years ago
Huang YunKun 3b81152ddc Fix springloaded version
Closes gh-3807
9 years ago
Stephane Nicoll 7c0c953f81 Add value alias for SpringApplicationConfiguration
Given that Spring Boot uses java config accross the board, a new `value`
attribute is now aliased to the existing `classes` attribute such that
one could write the following:

@SpringApplicationConfiguration(MyConfig.class)
public class MyTest {}

Closes gh-3635
9 years ago
Andy Wilkinson 25709385e6 Update Hypermedia samples following /hal and /links being combined
See gh-3696
9 years ago
Stephane Nicoll 7bc5322034 Merge branch '1.2.x' 9 years ago
Thomas Traude 2b6d7a3f15 Update URL to Groovy Docs
Closes gh-3715
9 years ago
Phillip Webb 28f32da74f Don't user root path for HAL endpoints
Update LinksMvcEndpoint and HalBrowserMvcEndpoint so that no longer try
to use the `/` context path. Links are now available from `/links` and
the HAL browser is available from `/hal`.

The actuator HAL browser now works with either WebJars or the Spring
Data version. It also now transforms the initial HTML so that the
form is pre-populated with `/links`.

When using Spring Data's HAL browser, the root includes a link to
`/links` with a rel of `actuator`.

See gh-3621
9 years ago
Vladimir Tsanev 632d78b6fb Prettify Log4J 2's default output
This commit updates the default output produced when using Log2J 2 to
be similar to the output produced by Logback. It introduces a new
converter for throwables that adds some whitespace around stacktraces
and a color converter that produces ANSI-colored output when enabled
via spring.output.ansi.enabled.

Closes gh-3548
9 years ago
Stephane Nicoll 6c7a5c5077 Harmonize Undertow's access log properties
Harmonize the configuration properties for Undertow to match the changes
made for gh-2491.

Move `spring.undertow.accessLog*` to `spring.undertow.accesslog.*`
9 years ago
Stephane Nicoll bfe930a873 Auto-configure @EnableConfigurationProperties
Add an auto-configuration that avoid a Spring Boot user to add
`@EnableConfigurationProperties` to its configuration to benefit from
that feature.

As our own auto-configurations are tested independently, such annotation
is still present to avoid a useless reference to this new
auto-configuration.

Closes gh-2457
9 years ago
Phillip Webb 891dd5a0f6 Polish 9 years ago
Stephane Nicoll 7c3cdead28 Remove unnecessary mainClassName
Since each sample has (supposedly) only one application class and not
a lot of the code, the `mainClassName` attribute in the gradle build is
not really useful and can lead to inconsistency if the application class
is moved.

See gh-3588
9 years ago
Justin Garrick 8960b88020 Fix package name of web-ui sample
Closes gh-3588
9 years ago
Stephane Nicoll 80754d5cc2 Polish
Closes gh-3534
9 years ago
Lucas Saldanha bf303b02f7 Add configuration properties validation sample
Create a new project sample that demonstrate the usage of
@ConfigurationProperties with configurationPropertiesValidator.

Fixes gh-3513
9 years ago
Stephane Nicoll e1479a02b7 polish
Use canonical version for the management's context path.
9 years ago
Phillip Webb d2133687b0 Use persistent servlet session with DevTools
Set `server.session.persistent=true` when running DevTools to ensure
persistent sessions are used.

Fixes gh-3530
9 years ago
Phillip Webb 728e64b929 Polish 9 years ago
Andy Wilkinson 2c81907d58 Flesh out and polish Embedded MongoDB auto-configuration contribution
Embedded MongoDB is now auto-configured when it is on the classpath.
The Mongo instance will listen on the port specified by the
spring.data.mongodb.port property. If this property has a value of
zero and randomly allocated port will be used. In such an event, the
MongoClient created by MongoAutoConfiguration will be automatically
configured to use the port that was allocated.

By default, MongoDB 2.6.10 will be used. This can be configured using
the spring.embedded-mongodb.version property. Mongo's sync delay
feature is enabled by default. This can be configured using the
spring.embedded-mongobd.features property.

Closes gh-2002
9 years ago
izeye f4589e7cc3 Fix typos
Closes gh-3504
9 years ago
Dave Syer de95012635 Workaround problems with order of endpoint handler mapping
When Spring Data REST is owning the home page it has its own
HandlerMapping with a fix (relatively) low priority. The /links
endpoint wants to own the home page as well, and our handler mapping
has a high priority for good reasons. This change addresses the
issue by checking if Spring Data REST is configured and if
the management context path (or  more specifically, the links
endpoint) is the same as the home page.

Fixes gh-3486
9 years ago
Phillip Webb 3b6a37d44b Remove accidentally committed .gitignore files 9 years ago
Phillip Webb 73be2c056f Clear logback status list on reset
Update LogbackLoggingSystem to clear logback status messages on reset.
This prevents shutdown errors from preventing subsequent startup.

Fixes gh-3472
9 years ago
Dave Syer e5d3fa0c6c Merge remote-tracking branch '1.2.x' 9 years ago
Dave Syer d0cf6b534b Add 3xx redirects to the "unmapped" class of requests for metrics
When Spring Security sends 302 responses to a login page we don't get
any information about the request matching in Spring MVC. Consequently
apps can end up with a lot of counter.status.302.* metrics (where
"*" can be whatever the user sent).

This change treats 3xx the same as 4xx (if it is unmapped it just gets
added to a metric called "unmapped" instead of using the actual request
path).

Fixes gh-2563
9 years ago
Spring Buildmaster 57f26c6bfc Next development version 9 years ago
Phillip Webb 5938c967a3 Polish 9 years ago
Stephane Nicoll a073a505ae Move spring.oauth2.* to security.oauth2.*
Unfortunately, we have no other choice to flip the ignoreUnknownFields
attribute of `SecurityProperties` has many different target are now set
for that namespace outside the class. See gh-3445 for a potential way
to improve that.

Closes gh-3327
9 years ago
Dave Syer c71196b92d Better segregation of export and redis keys 10 years ago
Phillip Webb e885dab752 Polish 10 years ago
Dave Syer 4581c5a273 Rationalize AMQP sample 10 years ago
Phillip Webb e8085016ba Polish Actuator hypermedia support 10 years ago
Dave Syer 74e9e0749b Add support for Spring HATEOAS hypermedia in Actuator endpoints
If spring-hateoas is on the classpath and an MvcEndpoint returns a
@ResponseBody it will be extended and wrapped into a Resource with links.
All the existing endpoints that return sensible JSON data can be extended
this way (i.e. not /logfile). The HAL browser will also be added as an
endpoint if available on the classpath. Finally, asciidocs for the
Actuator endpoints are available as a separate jar file, which if
included in an app will also generate a new (HTTP) endpoint.

Fixes gh-1390
10 years ago
Phillip Webb 43dc0c64c2 Fixup version numbers following release 10 years ago
Spring Buildmaster 7ce391db4f Next development version 10 years ago
Phillip Webb c84658af1b Remove unused .gitignore files 10 years ago
Dave Syer 1e464da248 Refactor the Actuator MVC configuration to allow more customization
There is a new spring.factories entry for
org.springframework.boot.actuate.autoconfigure.EndpointWebMvcConfiguration
which loads extra beans into the MVC config for the Actuator.
If the management context is a child context all the beans go in the
child (except the Spring Security filter still). A big bonus is that
you can add WebConfigurerAdapters to configure static resources etc.
A new component called ManagementContextResolver can be used to
locate the ApplicationContext for the MVC endpoints.

Fixes gh-3345
10 years ago
Matt Benson 183a2095f4 Fixup sample Ant build
Fixes gh-3324
10 years ago
Phillip Webb da82f08692 Create Apache Ant sample
See gh-3339
10 years ago
Phillip Webb d213cc05d5 Polish 10 years ago
Ivan Sopov a09a29be44 Add sample for Jetty 9.3
Closes gh-3325
10 years ago
Andy Wilkinson 00d594dcda Replace GzipFilter and Tomcat compression with general purpose approach
Closes gh-3296
10 years ago
Rob Baily 3c50386970 Fix logout in sample secure web applications
Fixes gh-1536
10 years ago
Phillip Webb f3f562f386 Support <springProfile> in logback configurations
Include support for a new <springProfile> element which can be used in
`logback-spring.xml` files to selectively enable or disable parts of the
configuration. For example:

	<configuration>
		...
		<springProfile name="staging">
			<logger name="sample.logback" level="TRACE" />
		</springProfile>
		...
	</configuration>

Fixes gh-3338
10 years ago
Phillip Webb 5bc8f0f708 Add logback sample application
Add a logback sample application to demonstrate how `logback-spring.xml`
can be used for customization.

See gh-2558
10 years ago
Dave Syer 1f6ac52b96 Change default behaviour of /health when not secured
The default is now to reveal all details unless sensitive=true
(instead of only revealing then if sensitive was explicitly false).
The definition of "secure" also changes to something more sensible
where it is only true if security is enabled.

Fixes gh-2816
10 years ago
Phillip Webb 61fc4f3f12 Polish copyright headers 10 years ago
Andy Wilkinson 0bb0f32c88 Reinstate code in Data REST sample that went AWOL in 1ce617f1 10 years ago
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