Spring 3.1 WebApplicationInitializer & Embedded Jetty 8 AnnotationConfiguration

后端 未结 13 1105
無奈伤痛
無奈伤痛 2020-12-13 14:16

I\'m trying to create a simple webapp without any XML configuration using Spring 3.1 and an embedded Jetty 8 server.

However, I\'m struggling to get Jetty to recogni

13条回答
  •  感情败类
    2020-12-13 14:23

    What about just setting the context attribute that tells the scanner which things belong on the container classpath that need to be scanned?

    context attribute: org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern ./servlet-api-[^/].jar$

    It is designed to be used with jar names, but you could just match everything.

    You'd need to use the WebInfConfiguration as well as the AnnotationConfiguration classes.

    cheers Jan

提交回复
热议问题