Commit Graph

194 Commits

Author SHA1 Message Date
Phillip Webb
42e69359a8 Fixup version numbers following release 2015-03-30 23:25:03 -07:00
Spring Buildmaster
e03c11dda8 Next development version 2015-03-30 22:56:20 -07:00
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
2015-03-19 14:25:07 +00:00
Phillip Webb
a57a88f5cf Move master to 1.3.0.BUILD-SNAPSHOT 2015-02-26 17:01:02 -08:00
Phillip Webb
8ce39bda88 Fixup version numbers following release 2015-02-26 15:59:57 -08:00
Spring Buildmaster
8f0ad02237 Next development version 2015-02-26 15:26:53 -08:00
Andy Wilkinson
247c596f8c Remove duplicate console appender from Actuator sample's logback config
Closes gh-2381
2015-01-20 11:44:23 +00:00
Phillip Webb
9dd4d43cec Fixup version numbers following release 2015-01-08 00:19:04 -08:00
Spring Buildmaster
60725cd8bd Next development version 2015-01-07 23:37:07 -08:00
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
2014-12-25 12:42:45 -08:00
Phillip Webb
8fd99bde8b Update samples to use specific log configuration 2014-12-17 11:33:29 -08:00
Phillip Webb
43fb5b63a8 Fixup version numbers following release 2014-12-10 19:49:23 -08:00
Spring Buildmaster
1a788c1741 Next development version 2014-12-10 16:35:50 -08:00
Dave Syer
3c1e48c89a Better handling of anonymously accessible endpoints
Shares the /health endpoint request mapping between security config
and MVC dispatcher. Generalizes so that instead of a marker
interface (AnonymouslyAccessibleMvcEndpoint), an MvcEndpoint
signals that it wants to control its own access rules by adding
a Principal to the @RequestMapping method parameters (more @MVC).

Fixes gh-2015 slightly differently
2014-11-28 06:33:30 +00:00
Andy Wilkinson
2ce057ca96 Allow /health to be accessed anonymously irresepctive of its sensitivity
The changes in 3bb598a overload the health endpoint's sensitive
property such that it's now considered sensitive if management
security is enabled. When an endpoint is sensitive anonymous
access is prevented. This breaks the health endpoint which should
return a filtered view of the server's health when it's accessed
anonymously rather than rejecting the request.

This commit introduces AnonymouslyAccessibleMvcEndpoint, a marker
extension of the MvcEndpoint interface. It is implemented by
HealthMvcEndpoint. ManagementSecurityAutoConfiguration has been
updated to allow anonymous access to endpoints that aren't sensitive
or that implement AnonymouslyAccessibleMvcEndpoint.

Fixes gh-2015
2014-11-27 14:51:57 +00:00
Dave Syer
6ad626de49 Allows /configprops endpoint to show nested properties
Including maps and lists. Beans with no metadata (in
/META-INF/*spring-configuration-metadata.json) are just serialized
as they come (so might have problems like cycles). Serialization
errors are caught and rendered as an "error" for that bean. Any
problems can be fixed by preparing metadata and specifying which
properties are to be rendered that way.

Fixes gh-1746, fixes gh-1921
2014-11-19 14:10:01 +00:00
Andy Wilkinson
35b7ba5cda Deprecate http.mappers.* properties
The http.mappers.* configuration properties assumed that the mapping
was JSON (on of the property names was jsonPrettyPrint) and also only
exposed a small subset of the configuration options supported by
Jackson (and GSON). The property names implied that it would configure
all HTTP mapping, however it was ignored by GsonAutoConfiguration.

This commit deprecates the support for http.mappers.* in favour of
configuring Jackson or Gson instead. Jackson can be configured
declaratively using the spring.jackson.* properties or programtically.
Gson can be configured programatically by using a GsonBuilder to
create a Gson instance with the desired configuration.
gh-1946 has been opened to add support for declarative configuration
of Gson.

Closes gh-1945
2014-11-18 13:51:48 +00:00
Phillip Webb
d039f43107 Update samples to use @SpringBootApplication
Update the relevant samples to use the new @SpringBootApplication
annotation.

Closes gh-1842
2014-11-06 22:51:09 -08:00
Dave Syer
a7e1ec842d Use @*@ delimiters in Maven resource filtering
It *is* very useful to have filtering on by default, so that is now
the case (in spring-boot-starter-parent). Users can filter resources
by default by adding @*@ placeholders (so as not to clash with Spring
${} placeholders).

Fixes gh-1199
2014-11-03 11:12:11 +00:00
Phillip Webb
d17b7c8195 Polish 2014-10-29 12:08:37 -07:00
Dave Syer
24e71e868f Allow /health and /info to authenticate anonymously
Then we can optionally find a non-anonymous principal if there
is one. If the user is anonymous then the health result is cached
up to endpoints.health.ttl (default 1000ms) to prevent a DOS attack.

Fixes gh-1353
2014-10-27 16:58:01 +00:00
Phillip Webb
0d0e5eb590 Merge branch '1.1.x' 2014-09-25 10:05:35 -07:00
Dave Syer
336b96b81c Copy server customization to management context
If the actuator endpoints are configured on a different port then there
are some settings in the main ServerProperties that we would like to
re-use (e.g. the access log). The easiest way to do that is to just
configure the management server using the same ServerProperties instance
and then overwrite the things that are different (and stored in
ManagementServerProperties).

Fixes gh-1581
2014-09-25 09:57:24 -07:00
Phillip Webb
338288205b Fixup version numbers following release 2014-09-04 15:40:55 -07:00
Spring Buildmaster
d63e4b4329 Next development version 2014-09-04 12:15:18 -07:00
Phillip Webb
6b083d7e0b Merge branch '1.1.x'
Conflicts:
	pom.xml
	spring-boot-actuator/pom.xml
	spring-boot-autoconfigure/pom.xml
	spring-boot-cli/pom.xml
	spring-boot-dependencies/pom.xml
	spring-boot-docs/pom.xml
	spring-boot-full-build/pom.xml
	spring-boot-integration-tests/pom.xml
	spring-boot-parent/pom.xml
	spring-boot-samples/pom.xml
	spring-boot-samples/spring-boot-sample-actuator-log4j/pom.xml
	spring-boot-samples/spring-boot-sample-actuator-noweb/pom.xml
	spring-boot-samples/spring-boot-sample-actuator-ui/pom.xml
	spring-boot-samples/spring-boot-sample-actuator/pom.xml
	spring-boot-samples/spring-boot-sample-amqp/pom.xml
	spring-boot-samples/spring-boot-sample-aop/pom.xml
	spring-boot-samples/spring-boot-sample-batch/pom.xml
	spring-boot-samples/spring-boot-sample-data-elasticsearch/pom.xml
	spring-boot-samples/spring-boot-sample-data-gemfire/pom.xml
	spring-boot-samples/spring-boot-sample-data-jpa/pom.xml
	spring-boot-samples/spring-boot-sample-data-mongodb/pom.xml
	spring-boot-samples/spring-boot-sample-data-redis/pom.xml
	spring-boot-samples/spring-boot-sample-data-rest/pom.xml
	spring-boot-samples/spring-boot-sample-data-solr/pom.xml
	spring-boot-samples/spring-boot-sample-flyway/pom.xml
	spring-boot-samples/spring-boot-sample-hornetq/pom.xml
	spring-boot-samples/spring-boot-sample-integration/pom.xml
	spring-boot-samples/spring-boot-sample-jetty/pom.xml
	spring-boot-samples/spring-boot-sample-liquibase/pom.xml
	spring-boot-samples/spring-boot-sample-parent-context/pom.xml
	spring-boot-samples/spring-boot-sample-profile/pom.xml
	spring-boot-samples/spring-boot-sample-secure/pom.xml
	spring-boot-samples/spring-boot-sample-servlet/pom.xml
	spring-boot-samples/spring-boot-sample-simple/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat-multi-connectors/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat8-jsp/pom.xml
	spring-boot-samples/spring-boot-sample-traditional/pom.xml
	spring-boot-samples/spring-boot-sample-web-freemarker/pom.xml
	spring-boot-samples/spring-boot-sample-web-groovy-templates/pom.xml
	spring-boot-samples/spring-boot-sample-web-jsp/pom.xml
	spring-boot-samples/spring-boot-sample-web-method-security/pom.xml
	spring-boot-samples/spring-boot-sample-web-secure/pom.xml
	spring-boot-samples/spring-boot-sample-web-static/pom.xml
	spring-boot-samples/spring-boot-sample-web-ui/pom.xml
	spring-boot-samples/spring-boot-sample-web-velocity/pom.xml
	spring-boot-samples/spring-boot-sample-websocket/pom.xml
	spring-boot-samples/spring-boot-sample-ws/pom.xml
	spring-boot-samples/spring-boot-sample-xml/pom.xml
	spring-boot-starters/pom.xml
	spring-boot-starters/spring-boot-starter-actuator/pom.xml
	spring-boot-starters/spring-boot-starter-amqp/pom.xml
	spring-boot-starters/spring-boot-starter-aop/pom.xml
	spring-boot-starters/spring-boot-starter-batch/pom.xml
	spring-boot-starters/spring-boot-starter-data-elasticsearch/pom.xml
	spring-boot-starters/spring-boot-starter-data-gemfire/pom.xml
	spring-boot-starters/spring-boot-starter-data-jpa/pom.xml
	spring-boot-starters/spring-boot-starter-data-mongodb/pom.xml
	spring-boot-starters/spring-boot-starter-data-rest/pom.xml
	spring-boot-starters/spring-boot-starter-data-solr/pom.xml
	spring-boot-starters/spring-boot-starter-freemarker/pom.xml
	spring-boot-starters/spring-boot-starter-groovy-templates/pom.xml
	spring-boot-starters/spring-boot-starter-hornetq/pom.xml
	spring-boot-starters/spring-boot-starter-integration/pom.xml
	spring-boot-starters/spring-boot-starter-jdbc/pom.xml
	spring-boot-starters/spring-boot-starter-jetty/pom.xml
	spring-boot-starters/spring-boot-starter-log4j/pom.xml
	spring-boot-starters/spring-boot-starter-logging/pom.xml
	spring-boot-starters/spring-boot-starter-mobile/pom.xml
	spring-boot-starters/spring-boot-starter-parent/pom.xml
	spring-boot-starters/spring-boot-starter-redis/pom.xml
	spring-boot-starters/spring-boot-starter-remote-shell/pom.xml
	spring-boot-starters/spring-boot-starter-security/pom.xml
	spring-boot-starters/spring-boot-starter-social-facebook/pom.xml
	spring-boot-starters/spring-boot-starter-social-linkedin/pom.xml
	spring-boot-starters/spring-boot-starter-social-twitter/pom.xml
	spring-boot-starters/spring-boot-starter-test/pom.xml
	spring-boot-starters/spring-boot-starter-thymeleaf/pom.xml
	spring-boot-starters/spring-boot-starter-tomcat/pom.xml
	spring-boot-starters/spring-boot-starter-velocity/pom.xml
	spring-boot-starters/spring-boot-starter-web/pom.xml
	spring-boot-starters/spring-boot-starter-websocket/pom.xml
	spring-boot-starters/spring-boot-starter-ws/pom.xml
	spring-boot-starters/spring-boot-starter/pom.xml
	spring-boot-tools/pom.xml
	spring-boot-tools/spring-boot-dependency-tools/pom.xml
	spring-boot-tools/spring-boot-gradle-plugin/pom.xml
	spring-boot-tools/spring-boot-loader-tools/pom.xml
	spring-boot-tools/spring-boot-loader/pom.xml
	spring-boot-tools/spring-boot-maven-plugin/pom.xml
	spring-boot-versions/pom.xml
	spring-boot/pom.xml
2014-08-07 13:16:27 -07:00
Phillip Webb
cac3865ffa Fixup version numbers following release 2014-08-07 13:11:16 -07:00
Spring Buildmaster
74d0c5185a Next development version 2014-08-07 11:59:17 -07:00
Andy Wilkinson
7f9ef1cf5b Merge branch '1.1.x' 2014-08-06 14:01:36 +01:00
Andy Wilkinson
e185793396 Update test to correct name of metric for request that returns a 401
The request is being made to '/' and, while the application does have
a mapping for '/', that mapping is not looked for before Spring
Security's filter rejects the request with a 401. This means that the
request is considered to be unmapped and this is reflected in the
metric's name.

See #1331 and #1333
2014-08-06 13:38:42 +01:00
Stephane Nicoll
249e09d9bc Switch master to 1.2.0.BUILD-SNAPSHOT 2014-07-11 10:44:05 +02:00
Phillip Webb
3c7d825658 Fixup version numbers following release 2014-07-08 03:07:03 -07:00
Spring Buildmaster
40327e1ae6 Next development version 2014-07-08 02:33:36 -07:00
Phillip Webb
fa88c481a5 Remote trailing whitespace 2014-07-02 15:17:14 -07:00
Dave Syer
fd757cb371 Add logging.level to application.properties
E.g.

logging.level.org.springframework: DEBUG
logging.level.org.hibernate: WARN

Fixed gh-788
2014-06-27 15:49:17 +01:00
Phillip Webb
cc61d92b88 Fixup build following release 2014-06-27 07:00:57 -07:00
Spring Buildmaster
981669b7c0 Next development version 2014-06-26 14:09:54 -07:00
Phillip Webb
200cd535c2 Revert "Next development version"
This reverts commit 67189477fe.
2014-06-26 11:03:09 -07:00
Spring Buildmaster
67189477fe Next development version 2014-06-26 10:51:35 -07:00
Phillip Webb
9632abf825 Formatting and cleanup 2014-06-26 09:41:15 -07:00
Phillip Webb
91bbd20ca0 Fixup version numbers following release 2014-06-24 14:53:08 -07:00
Spring Buildmaster
542f3cbda8 Next development version 2014-06-24 13:53:56 -07:00
Phillip Webb
143e1918b7 Fixup versions following release 2014-06-11 12:16:08 -07:00
Spring Buildmaster
4ca26a21dc Next development version 2014-06-11 10:46:27 -07:00
Phillip Webb
9e93719922 Fixup version numbers following release 2014-06-10 14:20:41 -07:00
Spring Buildmaster
05ed7b3bcd Next development version 2014-06-10 12:40:35 -07:00
Phillip Webb
3007a777d0 Roll back to 1.1.0.BUILD-SNAPSHOT 2014-06-10 09:00:08 -07:00
Phillip Webb
5adbf32c18 Fixup version numbers following release 2014-06-09 22:13:54 -07:00
Spring Buildmaster
c650f2391e Next development version 2014-06-09 21:55:19 -07:00
Dave Syer
bc85f388aa Add test for gh-1058 2014-06-09 17:05:12 +01:00
Dave Syer
68448a8c68 Use the ServerProperties to add prefixes to paths
when server.servletPath is set we need to add prefixes to
the security filter paths.

Fixes gh-945
2014-05-24 08:33:14 +01:00
Christian Dupuis
4648188782 Rework HealthEndpoint and HealthIndicator
With this commit the state of a component or subsystem becomes a first-class citizen in Boot's application health support. HealthIndicators now return a Health instance with status and some contextual details.

An aggregation strategy has been introduced to aggregate several Health instances into one final application Health instance. Out of the box OrderedHealthAggregator can be configured to allow different ordering or a custom HealthAggregator bean can be registered.
2014-05-22 12:27:03 +02:00
Andy Wilkinson
58b768b204 Merge branch '1.0.x' 2014-05-21 13:55:44 +01:00
Andy Wilkinson
6dafa15eef Remove mouldy start.groovy from the actuator sample
Fixes #900
2014-05-21 13:55:07 +01:00
Phillip Webb
8bcda1bcbe Polish 2014-05-20 18:26:56 +01:00
Dave Syer
58379e7593 Add hibernate-validator to spring-boot-starter-web
Fixes gh-616
2014-05-17 06:47:15 +01:00
Phillip Webb
01fcf61140 Polish 2014-05-15 09:51:16 +01:00
Dave Syer
5249f54c5a Integrate @ConfigurationProperties @Beans with DataSource configuration
We now have a much simpler DataSourceAutoConfiguration that binds to whatever
DataSource concrete type it finds at runtime. To be able to quickly switch between
Hikari and the other types of DataSource there's a minute shim for translating
the common properties (username, password, url, driverClassName), but actually
only url is different. The shim and also DataSource initialization is supported
through DataSourceProperties, but the other native properties get bound directly
through the concrete runtime type of the DataSource.

The /configprops endpoint works (and is exposed in the actuator sample).

Fixes gh-840, fixes gh-477, see also gh-808.
2014-05-13 16:46:04 +01:00
Dave Syer
5dd77a725c Enable access log explicitly in sample 2014-05-12 10:51:47 +01:00
Phillip Webb
61232395d8 Fixup versions 2014-05-10 23:47:31 +01:00
Christian Dupuis
c38f9bcdfa Add missing tests 2014-05-08 16:58:52 +02:00
Christian Dupuis
941c5560eb Remove duplicate hibernate-validator dependency from pom 2014-05-06 12:38:53 +02:00
Phillip Webb
decee8d871 Polish templates code 2014-04-30 21:36:09 +01:00
Dave Syer
2c087d4787 Update Boot version in gradle samples 2014-04-30 17:51:13 +01:00
Dave Syer
27580e726f Add generic error handling to BasicErrorController
Since Spring supports gobal error handling through
@ControllerAdvice, it is quite easy to set up more meta-data
about an exception for the BasicErrorController. You need
to be careful not to swallow Security exceptions, and probably
others (optionally) so this feature needs a bit more work.

See gh-538
2014-04-29 15:23:28 +01:00
Phillip Webb
64a835e91a Move master to 1.1.0.BUILD-SNAPSHOT 2014-04-24 12:45:20 +01:00
Spring Buildmaster
d3954a1703 Next development version 2014-04-24 02:24:28 -07:00
Phillip Webb
fad5ce45db Polish 2014-04-23 12:35:33 +01:00
Dave Syer
7b07fe8ce0 Convert remaining samples to use random port
Partial fix for gh-337. See also gh-607 which complements this, but might
conflict on a merge.
2014-04-17 20:29:04 -07:00
Dave Syer
f134e96053 Convert Actuator sample to dynamic ports 2014-04-17 17:36:09 -07:00
Spring Buildmaster
a5864ebcd0 Next development version 2014-04-06 22:43:18 -07:00
Dave Syer
72d7c286c0 Add Spring MVC-generated path suffixes to endpoint paths
Spring Security doesn't know that Spring MVC maps /foo, /foo.json
and /foo/ all to the same handler. This change explicitly adds
suffixes to the actuator endpoint matchers so they are properly
protected.
2014-04-03 14:03:09 +01:00
Spring Buildmaster
15e9dbe98b Next development version 2014-04-01 03:05:51 -07:00
Phillip Webb
1e68b7e0a9 Remove superfluous <packaging> tags from POMs 2014-04-01 02:07:43 -07:00
Phillip Webb
0af7f7e347 Add missing POM info 2014-04-01 02:07:42 -07:00
Phillip Webb
488b03387f Polish POM formatting 2014-04-01 02:07:36 -07:00
Phillip Webb
6f9bb233ad Revert "Next development version"
This reverts commit b67bb70ee3.
2014-04-01 00:38:48 -07:00
Spring Buildmaster
b67bb70ee3 Next development version 2014-03-31 22:38:42 -07:00
Phillip Webb
ac4cdd33c3 Revert "Next development version"
This reverts commit 1d0eea12eb.
Returning to 1.0.0.BUILD-SNAPSHOT for an updated release.
2014-03-31 17:14:30 -07:00
Spring Buildmaster
1d0eea12eb Next development version 2014-03-28 11:47:09 -07:00
Phillip Webb
aca67066bf Rename RestTemplates to TestRestTemplate
Rename the RestTemplates to TestRestTemplate to help indicate that it's
primarily intended for testing. Also now extend RestTemplate to allow
direct use, rather than via factory methods.

Fixes gh-599
2014-03-27 11:22:03 -07:00
Phillip Webb
d117a6b22b Polish 2014-03-27 11:21:51 -07:00
Dave Syer
71c2c69c92 Return actual status code not 200 to machine client
Machine clients are much more fussy than browsers and we
should take care to preserve the HTTP status for them.

Fixes gh-596
2014-03-27 17:23:47 +00:00
Dave Syer
8491f8eb07 Simplify build config for actuator sample 2014-03-27 08:59:03 +00:00
Phillip Webb
f70d6fb411 Declare all repositories in build samples
Update Gradle and Ant samples to consistently declare all repositories
(local, central, release, snapshot, milestone).

Fixes gh-426
2014-03-25 16:00:55 -07:00
Phillip Webb
d42bedf295 Rename @ConfigurationProperties attributes
Rename `name` to `prefix` and `path` to `locations`.
2014-03-24 11:44:52 -07:00
Phillip Webb
47eb8180b3 Rename spring-boot-starter-shell -> remote-shell
Fixes gh-462
2014-03-21 09:05:56 -07:00
Phillip Webb
632af6b1ab Polish gradle examples
Spaces -> Tabs, version number, whitespace.
2014-03-19 16:50:55 -07:00
Phillip Webb
4024450c5f Rename starter-shell-remote to starter-shell
Fixes gh-462
2014-03-19 16:28:36 -07:00
Andy Wilkinson
e90bc49988 Add dependency on spring-boot-starter-test
Fixes #530
2014-03-19 11:32:25 +00:00
Phillip Webb
c5ee3c7eba Remove duplicate documentation
Remove README files that have been since been migrated to the reference
documentation. Also updated remaining markdown files to asciidoctor to
save having a mix of different formats.

Fixed gh-503
2014-03-16 23:00:12 -07:00
Phillip Webb
80ac1fb0cd Polish 2014-03-15 13:02:01 -07:00
Dave Syer
7a285cf65d Convert all sample tests to @IntegrationTest where appropriate
Makes them a lot more readable IMO, and also enables @Autowiring
from the context into the test case (sweeet). I added @DirtiesContext
to all of them as well to be on the safe side, but possbly that can be
optimized in some way as well.
2014-03-11 13:54:30 +00:00
Dave Syer
6657e3ef84 More care taken with management.contextPath
The management.contextPath property should now be respected in a
secure application, whether or not the management.port is different.

Added some test cases in the sample to verify.

Fixes gh-469
2014-03-10 16:28:13 +00:00
Sebastien Deleuze
ab6c8dfee3 Use org.springframework.boot groupId in spring-boot-samples
Use org.springframework.boot instead of ${project.groupId}
groupId in order to make it easier to use spring-boot-samples
modules as a starting point for new projects.
2014-03-07 17:02:20 +00:00
Andy Wilkinson
326c12d1f5 Update Spring repository url in Gradle samples 2014-03-04 13:15:41 +00:00
Spring Buildmaster
b0d4e8ae69 Next development version 2014-03-03 22:46:12 -08:00
Spring Buildmaster
cb8668a151 Release version 1.0.0.RC4 2014-03-03 22:46:05 -08:00
Spring Buildmaster
1367d57e8c Next development version 2014-02-13 13:19:12 -08:00
Spring Buildmaster
eaff1677a7 Release version 1.0.0.RC3 2014-02-13 13:18:56 -08:00