Implementing a subclass of WebServiceGatewaySupport
and deploying it within Spring Boot, you will see the following log message:
025-08-21T13:32:25.007+02:00 WARN 97214 --- [XXX] [ restartedMain] o.s.aop.framework.CglibAopProxy : Unable to proxy interface-implementing method [public final void org.springframework.ws.client.core.support.WebServiceGatewaySupport.afterPropertiesSet() throws java.lang.Exception] because it is marked as final, consider using interface-based JDK proxies instead.
Please remove the final
keyword in order to prevent this WARN message from being logged. See also here why this is logged.
Comment From: snicoll
you will see the following log message:
We can't make such a change based on what you've described. There's no sample and no indication of the version you are using. FWIW, the final
modifier is intentional: it prevents sub-classes to skip the initialization that WebServiceGatewaySupport
needs. Also, the issue you've referenced is 8 years old so I don't think this is something we could blindly use to make a decision.
If you want to pursue this, please create a small sample from start.spring.io that reproduces the problem you've described. You can attach the sample here or push the code to a separate GitHub repository.
Comment From: siom79
I have setup a minimal project reproducing the described issue: https://github.com/siom79/spring-boot-starter-web-services-issue. You can clone it and run ./gradlew bootRun
.
It seems that the WARN logging appears due to the @Timed
annotation from the micrometer library in conjunction with spring-boot-starter-actuator
and spring-boot-starter-aop
.
Comment From: snicoll
Thanks for the sample. This is in no way specific to Spring WS. I can replicate with a bare-bone project that doesn't use it at all, see https://github.com/snicoll-scratches/spring-ws-1675. Running it leads to:
2025-08-21T15:26:33.877+02:00 INFO 91564 --- [ main] com.example.demo.DemoApplication : Starting DemoApplication using Java 17.0.16 with PID 91564 (/Users/snicoll/Downloads/gh-1675/out/production/classes started by snicoll in /Users/snicoll/Downloads/gh-1675)
2025-08-21T15:26:33.878+02:00 INFO 91564 --- [ main] com.example.demo.DemoApplication : No active profile set, falling back to 1 default profile: "default"
2025-08-21T15:26:33.999+02:00 WARN 91564 --- [ main] o.s.aop.framework.CglibAopProxy : Unable to proxy interface-implementing method [public final void com.example.demo.TestSupport.afterPropertiesSet() throws java.lang.Exception] because it is marked as final, consider using interface-based JDK proxies instead.
2025-08-21T15:26:34.036+02:00 INFO 91564 --- [ main] com.example.demo.DemoApplication : Started DemoApplication in 0.285 seconds (process running for 0.441)
We can't remove the final
modifier for the reason you've described as it would mean we'd have to chase down every single use of such pattern to be consistent.
I wonder if Spring Framework could do something about this. We'll move this issue there to see what we can do.