Tomcat - won't load my META-INF\services\javax.servlet.ServletContainerInitializer file?

后端 未结 4 1532
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-02 07:32

I have a web project that has a \\META-INF\\services\\javax.servlet.ServletContainerInitializer file with its content pointing to the fully qualified name of a

4条回答
  •  清酒与你
    2021-01-02 08:00

    For tomcat to load the META-INF directory , it has to be in classes folder . If you are using maven project , just put the META-INF directory inside src/main/resources directory .. on mvn package the same will be copied to classes directory .. No need of separerate jar .. if jar is prefered you can use HandlesTypes annotation ..

提交回复
热议问题