zengkid / SmartTomcat

The Tomcat plugin for Intellij IDEA
Apache License 2.0
126 stars 55 forks source link

Servlet Annotation @PostConstruct & @PreDestroy issue #52

Closed MagnusLeona closed 4 years ago

MagnusLeona commented 4 years ago

I met up with a problem . With tomcat@9.0.37 and servlet@4.0 and JDK 14.0, Servlet annotation @PostConstruct and @PreDestroy dont work running on smart tomcat, i just dont know what is happening , and i notice that they can work well on EnterPrise Version Tomcat Server. Plz check it, thank you

zengkid commented 4 years ago

I work fine with tomcat 9.0.35, you can try the sample project https://github.com/zengkid/smart-tomcat-sample

image

MagnusLeona commented 4 years ago

yeah i noticed it happend because i imported the wrong jar. i was supposed to import javax.annotation.jar instead of javax.annotation-api.jar. And for all, thank you for your help ;)