Question: I would like checkstyle to validate javadoc on classes only if it is present, so no warnings that the javadoc is missing.

For javadoc on methods this is possible with the allowMissingJavadoc parameter, but I don't see an equivalent for the JavadocType module.

Thanks!

Answer: 
Finally, I resolved the problem adding an interceptor as a component: 

```
@Component
public class SpringSessionClientHttpRequestInterceptor implements ClientHttpRequestInterceptor {

@Override
public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution)
    throws IOException {

    request.getHeaders().add("Cookie", "SESSION=" + sessionId);
    return execution.execute(request, body);
}

```

}

And I created a @Bean to configure the rest template:

```
@Bean
public RestTemplate restTemplate(){
    RestTemplate rest = new RestTemplate();
    ClientHttpRequestInterceptor interceptor= new SpringSessionClientHttpRequestInterceptor();
    List<ClientHttpRequestInterceptor> interceptors = new ArrayList<ClientHttpRequestInterceptor>();
    interceptors.add(interceptor);
    rest.setInterceptors(interceptors);  
    return rest;
}

```
> 
> headers.set("Session",sessionID);
> 
> 
> 

I assume that the problem is that you are using the wrong identifier. As far as I know, it is JSESSIONID by default.

Another problem that I can see here is that JSESSIONID expected to be in cookies. Try to put it in cookies when sending a request to your 'microservice2'.