Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding PlusConfiguration and AnnotationConfiguration to jetty WebAppContext #6681

Closed
nyilmaz opened this issue Aug 18, 2016 · 1 comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@nyilmaz
Copy link

nyilmaz commented Aug 18, 2016

Since jetty-annotations and jetty-plus dependencies are available via websocket, AnnotationConfiguration and PlusConfiguration can be added in JettyEmbeddedServletContainerFactory. This will enable, for example, annotations like @MultipartConfig are picked up and registered by jetty.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 18, 2016
@wilkinsona
Copy link
Member

Unfortunately, I don't think we should do this. As described in the documentation:

Embedded servlet containers will not directly execute the Servlet 3.0+ javax.servlet.ServletContainerInitializer interface, or Spring’s org.springframework.web.WebApplicationInitializer interface.

This is an intentional design decision intended to reduce the risk that 3rd party libraries designed to run inside a war will break Spring Boot applications.

You can use Boot's own @ServletComponentScan to have it scan for and automatically register @WebServlet, @WebFilter and @WebListener beans with the container. Now that #6680 has been fixed, it'll also honour @MultipartConfig.

@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

3 participants