Which version of the cxf starter is this in?

On Mon, Jul 18, 2016 at 3:21 AM, Sergey Beryozkin <[email protected]>
wrote:

> Hi
>
> On 17/07/16 23:06, Christopher Gardner wrote:
>
>> Is there a preferred approach to setting up in and out interceptors?  I'm
>> doing the following, which works:
>>
>> @Configuration
>> public class RestConfig {
>> @Autowired
>> private SpringComponentScanServer provider;
>> @Bean
>> public HelloController helloController() {
>> return new HelloController("blah");
>> }
>> @PostConstruct
>> public void prepareInterceptors() {
>> provider.getInInterceptors().add(new LoggingInInterceptor());
>> provider.getOutInterceptors().add(new LoggingOutInterceptor());
>> }
>> }
>>
>> That is OK. In some cases you can optimize and register a feature
> instead, for example:
>
> provider.getFeatures().add(new LoggingFeatures());
>
>
> FYI, I've just updated LoggingFeature to make it visible to the
> auto-discovery process:
>
> http://git-wip-us.apache.org/repos/asf/cxf/commit/7e9deb7f
>
> So you would only add 'org.apache.cxf.feature' to the list of packages to
> scan:
>
> https://github.com/apache/cxf/blob/master/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml#L11
>
> Ex, classes-scan-packages:
> org.apache.cxf.jaxrs.swagger,org.apache.cxf.feature
>
> which would pick up Swagger2Feature and LoggingFeature
>
> Sergey
>

Reply via email to