Discover function type from FactoryBean

* Fix spring-integration sample

* Added discoverFunctionTypeFromClass() method to FunctionTypeUtils

* A `FactoryBean` may produce a function instance as well.
Add a logic into `BeanFactoryAwareFunctionRegistry` to discover a function type from the `FactoryBean.getObjectType()`
This commit is contained in:
Oleg Zhurakousky
2019-09-25 10:24:07 -04:00
committed by Artem Bilan
parent bdd4320a59
commit 97bea81836
6 changed files with 84 additions and 9 deletions

View File

@@ -29,14 +29,14 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
//@RunWith(SpringRunner.class)
//@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class FunctionSampleSpringIntegrationApplicationTests {
@Autowired
private TestRestTemplate restTemplate;
//@Test
@Test
public void upperCase() {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.APPLICATION_JSON);