Commit Graph

165 Commits

Author SHA1 Message Date
Artem Bilan
460ba9cecb GH-1569: Fix binder-specific environment merging
Fixes spring-cloud/spring-cloud-stream#1569

When `inheritEnvironment = true` (default), some provided properties
(including `spring.main.sources`) are not populated into the target
binder's environment, since Spring Boot relies on the presence of
the `configurationProperties` properties source which is transferred
from the parent context

* Remove `configurationProperties` from the `binderEnvironment` before
starting binder's application context
* Ensure that `spring.main.sources` is applied for the binder's
application context in the `BinderFactoryConfigurationTests`
* Fix `GreenfieldFunctionEnableBindingTests` for random HTTP port since
`8080` is too generic and clashes with build environment
* Fix `StreamListenerAnnotatedMethodArgumentsTests` for `Locale.US`
for proper assertion against validation message
* Mention `spring.profiles.active` configuration property for the
binder specific environment
2019-01-21 15:40:55 +01:00
buildmaster
664b850996 Bumping versions to 2.1.1.BUILD-SNAPSHOT after release 2019-01-08 11:43:40 +00:00
buildmaster
2453e181b5 Going back to snapshots 2019-01-08 11:43:40 +00:00
buildmaster
1535f37e16 Update SNAPSHOT to 2.1.0.RELEASE 2019-01-08 11:41:31 +00:00
buildmaster
afa5cd2f9b Going back to snapshots 2018-12-20 19:37:20 +00:00
buildmaster
953de7f02e Update SNAPSHOT to 2.1.0.RC4 2018-12-20 19:36:19 +00:00
buildmaster
c928b28a10 Going back to snapshots 2018-12-13 20:19:16 +00:00
buildmaster
5d07afc956 Update SNAPSHOT to 2.1.0.RC3 2018-12-13 20:18:14 +00:00
Oleg Zhurakousky
f080ca6cb0 GH-1554 resetting propagateOriginalContentType flag to be true 2018-12-13 15:26:04 +01:00
Oleg Zhurakousky
07b9adb0dc GH-1554 Introduced flag to disable 1.3 content type propagation
Introduced `spring.cloud.stream.propagateOriginalContentType` boolean property  on BindingServiceProperties
Resolves #1554
2018-12-12 16:50:28 +01:00
buildmaster
2c8e2255d0 Going back to snapshots 2018-11-19 14:42:16 +00:00
buildmaster
4775defbf0 Update SNAPSHOT to 2.1.0.RC2 2018-11-19 14:41:20 +00:00
Oleg Zhurakousky
777eec819e GH-1527 Added special handling for text/* CT
Added special handling for 'texrt/*' conternt-type where unless the input type is declared to be byte[], the payload will always be converted to String

Resolves #1527
2018-11-15 09:11:49 +01:00
Oleg Zhurakousky
b569e26177 Going back to snapshots 2018-10-30 14:31:03 +01:00
Oleg Zhurakousky
a83bdb7f34 Update SNAPSHOT to 2.1.0.RC1 2018-10-30 14:28:31 +01:00
Marcin Grzejszczak
80e8541085 Going back to snapshots 2018-10-24 11:50:35 +02:00
Marcin Grzejszczak
be67c92f07 Update SNAPSHOT to 2.1.0.M4 2018-10-24 11:42:13 +02:00
Oleg Zhurakousky
28990fe995 GH-1425 Added support for type-aware channels
Resolves #1425
2018-10-23 13:36:13 +02:00
Oleg Zhurakousky
a9904ee202 added initail fixes for default properties merge 2018-10-05 13:30:11 -04:00
Oleg Zhurakousky
274a5a9676 Polishing previous commit
Resolves #1382
Resolves #1491
2018-10-03 08:55:48 -04:00
David Harrigan
125840ddeb Add (javax.)Validation Support for Stream Listener
This change allows StreamListener method arguments annotated with @Valid to be
validated against a registered Validator.

Resolves #1382

-=david=-
2018-10-03 08:39:42 -04:00
Soby Chacko
fcbbd09502 Next update version: 2.1.0.BUILD-SNAPSHOT 2018-09-21 11:30:28 -04:00
Soby Chacko
f498323f61 2.1.0.M3 Release 2018-09-21 10:42:22 -04:00
Soby Chacko
20a443081b Next update version: 2.1.0.BUILD-SNAPSHOT 2018-08-28 10:12:14 -04:00
Soby Chacko
7ce25617d2 2.1.0.M2 Release 2018-08-28 09:49:25 -04:00
Soby Chacko
c85660fba2 Spring Boot 2.1 upgrade
* Removed MockBinderRegistryConfiguration
* Move necessary beans from `BindingServiceConfiguration` which is now auto configurable into
  `BinderFactoryConfiguration` that is invoked by `EnableBinding` in order to avoid certain
  cyclic dependency issues. The beans moved are binding target factories of type
  `MessageSourceBindingTargetFactory` and `SubscribableChannelBindingTargetFactory` and their dependencies.
  As a side effect, `ContentTypeConfiguration` is also brought back at the `EnableBinding` level through
  `BinderFactoryConfiguration`.
* Restore `ServerController`  bean in SchemaServerConfiguation as the removal of it
  earlier introduced  some connectivity issues with the schema registry server.
* Update copyrights
2018-08-14 13:42:02 +02:00
Artem Bilan
776fe5da77 Fix aggregated application behavior
* After moving some bunch of beans from the `@EnableBinding` to the
auto-configuration for proper conditional lifecycle we need to be sure
that all those support beans are registered for each child context as
it was before after parsing imports on the `@EnableBinding`.
This way add `search = SearchStrategy.CURRENT` for all the conditions
in the `BindingServiceConfiguration`
* Fix `TestSupportBinderConfiguration` to rely only on the `Binder`
instance created once in the parent level.
This way when we use an aggregated application, only the parent context
creates for us a `TestSupportBinder` and all the child contexts reuse it.
* Register `BinderFactory` only once in parent ctx
2018-08-10 11:37:14 -04:00
Soby Chacko
ae445e73ac Spring Boot 2.1 upgrade related changes
* Instead of redefining `BinderTypeRegistry` as a bean in several tests, properly use spring.binders
  to define mock binders and then choose a default binder in tests in case of multiple binders in
  same spring.binders file.
* Remove `BindingServiceConfiguration` in `EnableBinding` and introduce it as a proper
  Spring Boot autoconfiguration class. Added `BindingServiceConfiguration` to spring.factories.
* Move `BinderFactory` bean into `BindingServiceConfiguration` and add `ConditionalOnMissingBean`
  on it so that downstream users can define new `BinderFactory` beans as part of autoconfiguration.
* Remove `ConditionalOnMissingBean` from the `BinderTypeRegistry` bean in `BinderFactoryConfiguration`
  as we don't expect this bean to be overridden.
* Remove previously added property `spring.main.allow-bean-definition-overriding` in several tests.
* Since web/actuator is optional now, remove unncecessarily setting server.port to `0` in tests
* Ensure that `BindersHealthIndicatorAutoConfiguration` is autoconfigured after `BindingServiceConfiguration`
  so that it has a `BinderFactory` available.
* Remove redefining `ServerController` bean in `SchemaServerConfiguration` as this is already created through
  component scanning and causing the bean overriding exceptions.
* Tests cleanup and polishing.

Resolves #1429, #1430
2018-08-10 11:27:11 -04:00
Soby Chacko
cb105ab0ec Upgrade Spring Cloud Build to 2.1.0
This upgrades to Spring Boot 2.1.0
Fix tests where the beans need to get overridden
Minor cleaning up
Polishing

Resolves #1426
2018-08-07 19:47:13 +02:00
Oleg Zhurakousky
37ecae4ab7 GH-1412 Ensured SpelExpressionConverterConfiguration present in multi-binder
Ensured that SpelExpressionConverterConfiguration is always present in the AC regardless of single or multi-binder application configuration
Polishing

Resolves #1412
2018-07-09 19:54:55 -04:00
Soby Chacko
dae35f2dbf Next update: 2.1.0.BUILD-SNAPSHOT 2018-06-27 13:53:31 -04:00
Soby Chacko
79a09791cd 2.1.0.M1 Release 2018-06-27 13:45:15 -04:00
Soby Chacko
a82c906913 Remove error.destination property
Remove the ability to bind global error channel directly to a broker destination through error.destination property.
The preferred way to consume error messages in a brokder destination is through the binder specific DLQ mechanism.
Global error channel may still be consumed by a ServiceActivator or StreamListener, but it is not bound to a broker destination.

Remove the internal bridge channel from the global error channel that is used for content type conversion.
Remove tests associated with this feature.
Deprecate class `SingleBindingTargetBindable` as this is not used by the framework any longer.
Docs polishing.

Resolves #1398
Resolves #1401
Resolves #1269
2018-06-27 09:11:50 -04:00
Oleg Zhurakousky
baa2581725 Post-release update to 2.1.0.BUILD-SNAPSHOT 2018-04-06 14:48:33 -04:00
Oleg Zhurakousky
e6cff0c6e6 2.0.0.RELEASE 2018-04-06 13:54:04 -04:00
Soby Chacko
ae74c21720 Fixing compiler warnings
Fixing unchecked and deprecation warnings
Polishing

Resolves #1318
2018-03-21 14:55:22 -04:00
Soby Chacko
3d649e8e6a Back to 2.0.0.BUILD-SNAPSHOT 2018-03-12 16:29:38 -04:00
Soby Chacko
1bcfb8cd4a 2.0.0.RC3 Release 2018-03-12 15:13:46 -04:00
Gary Russell
12bd608908 Fix more trailing whitespace (tabs) 2018-03-12 10:26:46 -04:00
Soby Chacko
b2a4ef07dd Next version: 2.0.0.BUILD-SNAPSHOT 2018-03-01 09:27:42 -05:00
Soby Chacko
9e1930e1fd 2.0.0.RC2 Release 2018-03-01 09:08:10 -05:00
Soby Chacko
8ba93c2c79 Next version update: 2.0.0.BUILD-SNAPSHOT 2018-02-23 12:23:03 -05:00
Soby Chacko
11dd2392b1 2.0.0.RC1 Release 2018-02-23 12:02:39 -05:00
Oleg Zhurakousky
be96ec00cf Polish SI test binder after maven publishing
- Renamed classes and package to be consistent with the intentions of this binder (e.g., TestChannelBinder, TestChannelBinderConfiguration etc)
- Added package-info.java

Resolves #1241
2018-02-22 20:56:30 -05:00
Oleg Zhurakousky
0463f7939d GH-1175 Removed dependency on spring-boot-starter-web
- Removed spring-boot-starter-web dependency from the core
- Polished AggregateApplicationBuilder to ensure it thriows meaningful exception when web is enabled but 'spring-boot-starter-web' is not on the classpath
- fixed Aggregator tests to defualt to no-web
- added spring-boot-starter-web to schema projects

Resolves #1175
2018-02-09 10:39:52 -05:00
Soby Chacko
bac85f1a5b Back to 2.0.0.BUILD-SNAPSHOT 2018-02-05 13:54:26 -05:00
Soby Chacko
5a62215514 Update for 2.0.0.M4 Release 2018-02-05 13:30:40 -05:00
Oleg Zhurakousky
ee06a605d9 addressed PR comments 2018-02-03 07:33:27 -05:00
Oleg Zhurakousky
9672a5b4df Fixed double conversion issue
- removed custom conversion from In/Out interceptors delegating everything to the available  MessageConverters
- added initial version of content-type TCK to validate various content-type conversion scenarious
- added initial content-type conversion matrix to the WIKI https://github.com/spring-cloud/spring-cloud-stream/wiki/Content-type-conversion-matrix

Resolves #1130
Resolves #1071
2018-02-03 07:33:27 -05:00
Soby Chacko
c1749ca866 New abstraction for StreamListener method setup invoker.
StreamListenerMethodSetupOrchestrator is an API hook that allows
downstram binder implementations or applications to inject custom
strategies to alter the default StreamListener adapter method invocations.

This PR primarily focuses on allowing customizations on the oubound side.
For the inbound, StreamListenerMethodSetupOrchestrator interface provides
a default implementation.

Corresponding refactoring in StreamListenerAnnotationBeanPostProcessor.
By default StreamListenerAnnotationBeanPostProcessor will use the current
strategies used for invoking the StreamListener adapters. If beans are provided
for orchestration, they take precedence however.

Test changes.

Further polishing in StreamListenerAnnotationBeanPostProcessor.

Resolves #1177
Resolves #1179
2018-01-18 11:59:43 -05:00