PostConstruct is for dependency-injection. A vanilla tomcat does no dependency injection. Can you confirm you have a vanilla tomcat? Kind regards
Peter Rader -- Fachinformatiker AE / IT Software Developer Peter Rader Wilsnacker Strasse 17 10559 Berlin - GERMANY Tel: 0049 (0)30 / 6 29 33 29 6 Fax: 0049 (0)30 / 6 29 33 29 6 Handy: 0049 (0)176 / 87 521 576 Handy: 0049 (0)176 / 47 876 303 Gesendet: Freitag, 01. April 2022 um 23:02 Uhr Von: "Cherio" <che...@gmail.com> An: users@tomcat.apache.org Betreff: PostConstruct annotation in a filter since version 9.0.60 I observed an announced change in behavior in version 9.0.60 (and later). My application has a Spring class loaded as a javax.servlet.Filter. It has a method annotated with a PostConstruct annotation. Up until Tomcat 9.0.59 the annotation was handled by Spring. Starting with Tomcat 9.0.60 behavior changed. Now Tomcat attempts to take action on that method. The attempt fails with "java.lang.IllegalArgumentException: Invalid javax.annotation.PostConstruct annotation" exception and that results in the whole application failing to start. I use PostConstruct in other Spring modules but it looks like Tomcat cares only about classes it deals with directly. I do not see this change documented anywhere so I assume this may be a regression or an undocumented bug fix or feature. Does anyone have more information about this? Thanks! --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org