Closed akaigoro closed 6 years ago
@akaigoro please document the motivation for this ticket; off the top of my hat I don't see a use case for either.
Closed for lack of activity
did you notice my update to description, where I explained the motivation for this ticket?
@akaigoro I did not. I'll look into providing an example without XML, but I don't see how any of it could work without spring.
@akaigoro please have a look at https://github.com/ggeorgovassilis/spring-rest-invoker/commit/b6df5fce4af44e5b05f70e9de5ea07c4c1805fcb
thanks, but this solution is too complicated for me. For example, there is @Resource(name="BankService") private BankService bankService; but the method @Bean SpringRestInvokerProxyFactoryBean BankService() {} returns SpringRestInvokerProxyFactoryBean and not BankService. So I will not recommend my manager to use your library. Thanks again.
@akaigoro that's how factory beans work. You create a factory and that one creates the objects. This is transparent: the unit test (which I linked to earlier) uses BankService beans even though the configuration produces factory beans. You can read more here: https://www.baeldung.com/spring-factorybean
I, too, would recommend against using spring-rest-invoker for your projects because they don't seem to use Spring. You may want to look at RESTEasy https://resteasy.github.io/
Provide example how to create proxy object manually without xml configuration, and ideally, without using Spring at all. One possible application for this is creating integration tests against controllers of a web application, where the test suite does not use xml configuration files and tries to minimize the number of spring beans in order to run the tests faster.