Commit Graph

232 Commits

Author SHA1 Message Date
Dave Syer
b54c8e80e8 Add support for endpoints.env.post.enabled=false
Separately disable the POST /env from the GET. Fixes gh-106.
2016-04-18 10:04:56 +01:00
Dave Syer
1824a96968 Add conditional annotation to the refresh scope health indicator
i.e. management.health.refresh.enabled=false to disable

Fixes gh-106
2016-04-07 15:56:58 +01:00
Spencer Gibb
5b8b461853 Default appName to 'application'. 2016-04-01 18:01:48 -06:00
Spencer Gibb
1e71c5632c Merge pull request #103 from venilnoronha/master
* pull103:
  Moved RefreshEndpoint logic to ContextRefresher.
2016-04-01 15:19:25 -06:00
Venil Noronha
b92016b260 Moved RefreshEndpoint logic to ContextRefresher.
Fixes gh-101
2016-04-01 15:03:30 -06:00
Dave Syer
f29198bee1 Clarify flags for overriding remote property sources 2016-03-27 10:00:16 +01:00
Dave Syer
81b4c11dbb Revert to snapshots 2016-03-23 08:19:13 +00:00
Dave Syer
b4a6652f9e Bump for 1.1.0.RC2 2016-03-23 08:18:19 +00:00
Spencer Gibb
cea6ea0041 Update mvnw to determine profile on mac and linux 2016-03-22 12:40:54 -06:00
Dave Syer
0078f55c96 Correct location of encryption features 2016-03-22 13:52:53 +00:00
David Welch
072d6b40c7 Disable startup logging for Bootstrap environment
Fixes gh-100
2016-03-11 08:52:40 +00:00
Dave Syer
34c9b11284 Prevent possible memory leak with restart 2016-03-09 16:57:33 +00:00
Dave Syer
091b6af12a Sort bean names before generating serialization ID
Fixes gh-93
2016-03-09 16:57:33 +00:00
Spencer Gibb
68c67df67d Update RestTemplate creation documentation. 2016-03-08 15:48:12 -07:00
Dave Syer
ad08ca55f4 Change in contract for @LoadBalanced
Users now need to create their own bean and qualify it, and Spring
Cloud will customize it (instead of providing the @Bean itself).

This is much better for users, since they remain in control of the
bean declarations, and can choose which one (if any) is @Primary.
It's a breaking change for some apps (if they rely on a
@LoadBalanced RestTemplate being automatically injected).
2016-03-07 17:44:41 +00:00
Dave Syer
7eccbc4bac Make LoggingRebinder case insensitive
Partly to account for the fact that Sprng Boot publishes config
meta data with lower case values (don't ask).
2016-03-04 09:22:03 +00:00
Spencer Gibb
bfd25e1d50 Document @Primary for plain RestTemplate beans.
fixes gh-60
2016-03-02 19:02:43 -07:00
Spencer Gibb
0a58870114 Add tip for RestOperations or proxyTargetClass
fixes gh-66
2016-03-02 18:55:55 -07:00
Dave Syer
a839006880 Revert to snapshots 2016-03-02 17:42:58 +00:00
Dave Syer
449b65fcbe Update for 1.1.0.RC1 2016-03-02 17:42:35 +00:00
Dave Syer
07b4ceaa2a Fix mvnw script for milestones 2016-03-02 17:34:24 +00:00
Spencer Gibb
4a2c754ec6 Move o.s.c.util to o.s.c.commons.util
fixes gh-92
2016-03-02 09:22:03 -07:00
Spencer Gibb
779e5686a9 Add ability to disable parts of commons auto config.
fixes gh-95
2016-03-01 13:35:22 -07:00
Marcin Grzejszczak
760b0ef42c Merge pull request #94 from spring-cloud/pick_predefined_port
Pick predefined port if it's set
2016-03-01 06:58:28 +01:00
Marcin Grzejszczak
c7fc6552c0 Pick predefined port if it's set 2016-02-29 17:27:48 +01:00
Dave Syer
1c430d4ff3 Add test for serialization ID in RefreshScope
It should be unique and deterministic by default.
2016-02-29 13:57:37 +00:00
Dave Syer
099953f795 Use system environment property source 2016-02-25 11:52:34 +00:00
Spencer Gibb
539a537abb Expose some information.
See https://github.com/spring-cloud/spring-cloud-netflix/issues/643
2016-02-22 16:54:51 -07:00
Spencer Gibb
86ff712398 Properly close child contexts in destroy()
fixes gh-91
2016-02-22 10:49:54 -07:00
Dave Syer
624be9d19e Fix ordering of property sources
When the bootstrap properties are added back into the main Environment
we have to be careful that any source that is already there (such as
one that was added in a Spring Boot EnvironmentPostProcessor) is not
replaced in the wrong order.

Fixes gh-90
2016-02-15 10:25:19 +00:00
Dave Syer
8628949a8d Set -Pmilestone automatically based on pom version 2016-02-12 17:45:17 +00:00
Dave Syer
df7fe24a0e Make grep quiet when setting env vars 2016-02-12 15:48:42 +00:00
Dave Syer
858c144e10 Fix logic with MVN_GOAL 2016-02-12 15:06:20 +00:00
Dave Syer
3d76fd33a5 Align travis build with tools in spring-cloud/build 2016-02-12 13:17:08 +00:00
tc
bcb4e60448 Fix property source for decrypted variables
Use SystemEnvironmentPropertySource so that env vars can be
encrypted as well as property values (i.e. FOO_BAR will bind to
@Value("foo.bar")).

Fixes gh-89, fixes gh-87
2016-02-11 14:46:26 +00:00
Spencer Gibb
42b21d8399 Move RefreshEvent and Listener from consul/zk 2016-02-08 17:04:41 -07:00
Dave Syer
fc44a48194 Revert to snapshots 2016-02-04 18:01:59 +00:00
Dave Syer
fc895ca514 Update to 1.0.0.M5 2016-02-04 18:01:59 +00:00
Spencer Gibb
8a21f71ad1 Reuse pause and resume endpoints to the can be disabled.
fixes gh-86
2016-02-03 12:38:28 -07:00
Dave Syer
9c6aeba780 Ensure spring.main.sources is not used in refresh cycle
When the RefreshEndpoint makes a new Environment it creates a new
ApplicationContext with (hopefully) empty sources. If the user has
set spring.main.sources it won't be empty, so we should take care
to mask it off in the process.

Fixes gh-79
2016-02-02 21:55:19 +00:00
Dave Syer
6f463ad10d Add RefreshScopeHealthIndicator
Repots DOWN if there are errors in RefreshScope or
ConfigurationProperties rebinding, N.B. RefreshScope instantiates
its beans lazily after a refresh by default, so you won't see an
error until the bean is used.

Fixes gh-85
2016-02-02 17:28:52 +00:00
Spencer Gibb
9500052273 Generate readme for code of conduct.
See https://github.com/spring-cloud/spring-cloud-build/issues/26
2016-02-01 20:09:54 -07:00
Dave Syer
5cfe42b9af Fix careless mistake in tests 2016-02-01 13:26:21 +00:00
Dave Syer
7665f48653 Return address from the interface with lowest index
Also fixes unclosed closeable warnings

Fixes gh-82
2016-01-31 16:38:10 +00:00
Dave Syer
fb37883a92 Ensure BootstrapApplicationListener adds property sources on refresh
The fact that PropertySourceBootstrapConfiguration was re-using the
"bootstrap" property source name from the listener was a problem. The
listener has to be able to manage its own temporary property source name.

Fixes gh-83
2016-01-30 10:20:49 +00:00
Dave Syer
f550de7559 Only eagerly initialize refresh scope beans that are not lazy 2016-01-29 13:11:44 +00:00
Dave Syer
2112bb23ec Ensure metadata is writable by default 2016-01-25 10:00:40 +00:00
Dave Syer
b07c1a0351 Remove unecessary throws from close() 2016-01-25 10:00:12 +00:00
Dave Syer
12b9bfbe12 Extract file-based property sources during bootstrap
The bootstrap.properties need to stick with the default properties
during the process of initializing the application.properties
otherwise the ordering ends up wrong because of the addLast()
semantics in an Environment merge. To do this is a bit ugly with
the additional constraint that the default properties has to
remain a MapPropertySource (so that other processors can append
to it if needed). So we created a custom extension of
MapPropertySource that also carries all the bootstrap properties
during the phase where the application.properties are being
processed, but unpacks them as soon as possible afterwards
in an ApplicationContextInitializer, preserving the order, but
making the bootstrap.properties available effectively for the
whole of the startup and initializaion phase of the main context.
2016-01-23 10:37:20 +00:00
Dave Syer
b4c2c14d68 Further paring down of leaky proeprty sources in Bootstrap phase
The biggest problem addressed here is one where an
EnvironmentPostProcessor (reasonably) adds entries to the
defaultProperties in the bootstrap context, but then that
property source is not merged with the parent, or is merged
too late (because it only happens when the application context
parent is set). The result would be that things that were activated
during bootstrap would be not be activated in the main context, or
would be activated too late (early enough for beans to bind to but
not for other listeners and post processors to get access to the
additional properties).

See https://github.com/spring-cloud/spring-cloud-sleuth/issues/126
2016-01-22 14:26:54 +00:00