codecentric / cxf-spring-boot-starter

Enterprise & production ready SOAP webservices powered by Spring Boot & Apache CXF
https://blog.codecentric.de/en/2016/10/spring-boot-apache-cxf-spring-boot-starter/
144 stars 78 forks source link

Constructor autowiring (#56) #87

Closed bjansen closed 4 years ago

bjansen commented 4 years ago

The main change is that endpoints are instantiated using applicationContext.getAutowireCapableBeanFactory().createBean(clazz) rather than using reflection directly.

Actual autowiring is tested in WeatherServiceEndpointSystemTest.java.

Note that endpoints don't necessarily need the @Autowired annotation, Spring will also manage non-annotated constructors as long as the dependencies exist.

marcopaga commented 4 years ago

Thank you @bjansen. This make instatiating cleaner. Cool, that you brought this up and implemented it 👍

bjansen commented 4 years ago

My pleasure!