Commit Graph

106 Commits

Author SHA1 Message Date
Dave Syer
ac3ea7db36 Update to 1.0.0 2018-06-15 12:27:30 +01:00
Dave Syer
9dc569837a Revert to snapshots 2018-05-26 09:42:34 +01:00
Dave Syer
b20cb700ea Update to RC2 2018-05-26 09:34:02 +01:00
Dave Syer
f9aa461c18 Remove JSON dependencies from web module
They were a remnant from teh time when the mapping implementations
lived in the web module.

Fixes gh-176
2018-05-22 15:35:18 +01:00
Dave Syer
8e9a5504cb Revert to snapshots 2018-05-21 10:05:42 +01:00
Dave Syer
c29f800380 Update to 1.0.0.RC1 2018-05-21 10:04:54 +01:00
Dave Syer
66476559ed Move JsonMapper to spring-cloud-function-context
...in case it is needed elsewhere (see gh-151)
2018-05-21 08:50:35 +01:00
Dave Syer
e34324b5b4 Double check that a Function can return a Mono 2018-05-15 08:43:58 +01:00
Dave Syer
af5f5b78de Tweak support for single valued text HTTP exchange 2018-05-02 13:00:22 -04:00
Dave Syer
b59b43ddc5 Only expose Publisher via FunctionCatalog
Flux.from() is cheap and can be used to marshal the inputs everywhere
internally. With this change users ought to be able to register any
function of any Publisher type.
2018-05-01 12:06:34 -04:00
Dave Syer
ebd1646308 Push deployer configuration out of autoconfig
It tends to pop back into function apps where it is not needed
otherwise. Users that want to use the library need to import
the FunctionConfiguration directly using the
@EnableFunctionDeployer convenience annotation..
2018-04-25 17:37:55 +01:00
Dave Syer
8cf3d7bc5a Add some WebMvcTest support
Fixes gh-156
2018-04-24 16:15:42 +01:00
Dave Syer
0f8c1ce860 Make Jackson optional in web adapter
There is now a JsonMapper strategy with implementations and
autoconfiguration for Gson and Jackson. If Jackson is present
it is preferred (just like in Spring Boot).

Fixes gh-150
2018-04-24 11:57:47 +01:00
Dave Syer
73cf5d418a Update to Boot 1.5.12 2018-04-24 10:25:21 +01:00
Dave Syer
2df5dcc992 Compiler warnings 2018-04-24 09:46:48 +01:00
bishoy
0e41b8acc5 Support incoming application/x-www-form-urlencoded content
Fixes #129
2018-04-24 08:55:22 +01:00
Dave Syer
98cf4dc06e Revert to snapshots 2018-04-16 16:22:02 +01:00
Dave Syer
d1bcb7d142 Update to 1.0.0.M6 2018-04-16 16:04:31 +01:00
Dave Syer
5aeba1ea96 Convert Consumer<Foo> to Function<Flux<Foo>,Mono<Void>>
This results in a better experience for users because the consumer
that they write is only applied to a Flux that is subscribed to
by the framework once. It gives better control over the flow of
foos, e.g. if some component wants to subscribe on a thread.
2018-03-26 10:06:13 +01:00
Dave Syer
0be5f14766 Provide new config options for streams enabling composition
User can switch off source or sink behaviour (the default is to bind
to input and output streams), and then configure the name of a
supplier (for a source) or consumer (for a sink).
2018-03-18 14:19:51 +00:00
Dave Syer
efc99d2af0 Revert to snaphots 2018-03-16 11:40:12 -04:00
Dave Syer
feb8f51c41 Update to 1.0.0.M5 2018-03-16 11:28:53 -04:00
Dave Syer
8ab4d61bb4 Align MVC handling between Spring 4 and Spring 5
A Spring Boot 2.0 app should behave the same as a Spering Boot 1.5
app with this change. The key thing was to change the return type
of the FunctionController and move the computation of single
valuedness for the output there (instead of trying to do it in the
return value handler, which isn't used in Spring 5).
2018-03-16 07:08:43 -04:00
Dave Syer
740a94b202 Make Gson special config conditional on Boot 1.5
That was the samples still work with Spring Boot 2.0.0.

Fixes gh-157 (but we should add some tests)
2018-03-09 12:17:24 +00:00
Dave Syer
33b33adb4b Change FunctionCatalog to key off Class<?>
Makes it possible to support other "function" types in the future.
The user is always taking a risk with the lookup that the object
returned has the generic type desired (but that hasn't changed
with this commit). FunctionCatalog is a lot simpler as a result
and also a lot more flexible.
2018-02-28 14:18:09 +00:00
Dave Syer
616e2825c6 Move FunctionCatalog into context module 2018-02-27 09:05:28 +00:00
Dave Syer
5203401e00 Use Void as input type for Supplier, etc. 2018-02-26 14:15:54 +00:00
Dave Syer
bf41055dc7 Some dependency hygiene and update to Boot 1.5.10
The web module doesn't really need to depend on tomcat and all of
the Spring Boot web stack, but users need a way to grab that stuff
quickly if they want it (hence the new starter).

Also removed all spring-boot-starter dependencies from core and
context modules.
2018-02-23 12:12:06 +00:00
Dave Syer
b7d75c676e Exclude hibernate validator by default. Update Boot 2018-02-23 11:24:14 +00:00
Dave Syer
975398d30c Use Gson instead of Jackson by default 2018-02-23 11:19:23 +00:00
Dave Syer
a2a2932715 Revert to snapshots 2018-02-21 07:24:21 +00:00
Dave Syer
72efd58675 Update to 1.0.0.M4 2018-02-20 19:25:11 +00:00
Dave Syer
1b624c3531 Support for isolated class loaders extended to cover more functions
Functions with Flux and Message (as well as POJOs and Flux of POJO
which were already supported) should now work if they are created in
an isolated class loader. Preconditions:

* The class loaders must have the reactor-core (and reactive-streams)
shared between the app and the function. Practically speaking this means
there has to be a parent class loader with just reactive types, and
sibling children for the app and the function. This is not a new
requirement (it was needed for Flux of POJO anyway).

* Message types are handled reflectively, so they don't have to be in a
shared class loader. But they do have to be  on the class path on
both sides (obviously).
2018-02-16 08:16:55 +00:00
Dave Syer
c728cd4c01 Support for Function<Publisher<...>,...> 2018-02-14 14:09:28 +00:00
Dave Syer
73098244e3 Revert to snapshots 2018-01-20 11:57:49 +00:00
Dave Syer
77e0a5c514 Update to 1.0.0.M3 2018-01-19 13:55:34 +00:00
Dave Syer
7b46f925d7 Switch to SmartInitializingSingleton to avoid early instantiation
Use of BeanProcessor to catch a bean before it is used is a bit
agricultural these days. SmartInitializingSingleton is better and
frees application logs from one more annoying INFO log on an
early instantiation

2018-01-04 14:17:05.930  INFO 23472 --- [       Thread-0] trationDelegate$BeanPostProcessorChecker :
  Bean 'org.springframework.cloud.function.web.flux.ReactorAutoConfiguration' of type
  [org.springframework.cloud.function.web.flux.ReactorAutoConfiguration$$EnhancerBySpringCGLIB$$8d4844e]
  is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-01-04 14:27:32 +00:00
Dave Syer
1c0b603986 Add back spring-cloud-function-web (faster startup)
With this change there are now 2 choices for web endpoints. The
stream servlet binder is useful for multi-binder use cases
(e.g. HTTP -> message broker).
2018-01-03 15:06:33 +00:00
Dave Syer
1af0d451cf Migrate to servlet binder for web features 2018-01-03 15:06:33 +00:00
Dave Syer
47fd4c3ed2 Going back to snapshots 2017-12-01 10:31:18 +00:00
Dave Syer
b6310e1811 Update SNAPSHOT to 1.0.0.M2 2017-11-28 13:40:35 +00:00
Dave Syer
66beae56bd Add test for multi-valued response 2017-11-15 13:57:05 +00:00
Dave Syer
ad0ebd5cfc Add additional logic to function catalog to help with singletons
A registered singleton doesn't have a BeanDefinition, but it might have
a compiled type with enough generic information to pull out the
input and output types.
2017-11-10 12:11:55 +00:00
Dave Syer
af8b6e253e Revert to snapshots 2017-09-15 17:49:31 +01:00
Dave Syer
858b7404c6 Update to 1.0.0.M1 2017-09-15 17:48:51 +01:00
Dave Syer
3ccb925733 Merge core packages into one 2017-09-15 17:10:00 +01:00
Dave Syer
c8646d64d8 Strangle old inspector methods
Fixes gh-81
2017-07-13 13:37:45 +01:00
Dave Syer
a54f101b6d Make sure test jar is in test scope 2017-07-06 11:11:02 +01:00
Dave Syer
d1ccef62b5 FunctionHandlerMapping needs to be defensive with debug flag
Spring Boot apps often run with --debug (no boolean value), so
we need to be defensive and not barf if it's empty (and therefore
not convertible to a boolean)
2017-06-28 15:07:07 +01:00
Dave Syer
f94d672dc4 Add test and fix type inspection for scanned functions
Fixes gh-73
2017-06-28 11:00:07 +01:00