我正在尝试将我的项目置于生产模式,但没有运气:(
启动日志上的一切似乎都很好:
2017-01-09 09:26:24.453 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Registering Vaadin servlet
2017-01-09 09:26:24.453 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Servlet will be mapped to URLs [/vaadinServlet/*, /VAADIN/*]
2017-01-09 09:26:24.469 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Setting servlet init parameters
2017-01-09 09:26:24.469 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [productionMode] = [true]
2017-01-09 09:26:24.470 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [resourceCacheTime] = [3600]
2017-01-09 09:26:24.470 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [heartbeatInterval] = [60]
2017-01-09 09:26:24.470 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Set servlet init parameter [closeIdleSessions] = [true]
2017-01-09 09:26:26.260 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Checking the application context for Vaadin UI mappings
2017-01-09 09:26:26.263 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Registering Vaadin servlet of type [com.vaadin.spring.server.SpringVaadinServlet]
2017-01-09 09:26:26.273 INFO 80996 --- [ main] c.v.s.b.i.VaadinServletConfiguration : Forwarding @SpringUI URLs from {/admin/*=org.springframework.web.servlet.mvc.ServletForwardingController@6fc3f1a7, /pages/*=org.springframework.web.servlet.mvc.ServletForwardingController@6fc3f1a7, /dashboard/*=org.springframework.web.servlet.mvc.ServletForwardingController@6fc3f1a7, /admin/*/=org.springframework.web.servlet.mvc.ServletForwardingController@6fc3f1a7, /dashboard/*/=org.springframework.web.servlet.mvc.ServletForwardingController@6fc3f1a7, /pages/*/=org.springframework.web.servlet.mvc.ServletForwardingController@6fc3f1a7}
2017-01-09 09:26:26.283 INFO 80996 --- [ main] c.v.spring.navigator.SpringViewProvider : Looking up SpringViews
2017-01-09 09:26:26.288 INFO 80996 --- [ main] c.v.spring.navigator.SpringViewProvider : 18 SpringViews found
2017-01-09 09:26:26.858 INFO 80996 --- [ main] com.web.Application : Started Application in 26.671 seconds (JVM running for 27.124)
但是当我访问我的应用程序时:
2017-01-09 09:26:32.916 WARN 80996 --- [ XNIO-2 task-1] c.v.s.DefaultDeploymentConfiguration :
=================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
2017-01-09 09:26:35.613 INFO 80996 --- [ XNIO-2 task-2] c.vaadin.spring.server.SpringUIProvider : Checking the application context for Vaadin UIs
2017-01-09 09:26:35.615 INFO 80996 --- [ XNIO-2 task-2] c.vaadin.spring.server.SpringUIProvider : Found Vaadin UI [com.web.ui.AdminUI]
2017-01-09 09:26:35.616 INFO 80996 --- [ XNIO-2 task-2] c.vaadin.spring.server.SpringUIProvider : Found Vaadin UI [com.web.ui.DashboardUI]
2017-01-09 09:26:35.616 INFO 80996 --- [ XNIO-2 task-2] c.vaadin.spring.server.SpringUIProvider : Found Vaadin UI [com.web.ui.PagesUI]
2017-01-09 09:26:35.616 WARN 80996 --- [ XNIO-2 task-2] c.vaadin.spring.server.SpringUIProvider : Found no Vaadin UIs in the application context
2017-01-09 09:26:36.737 INFO 80996 --- [ XNIO-2 task-8] c.vaadin.spring.server.SpringUIProvider : Checking the application context for Vaadin UIs
2017-01-09 09:26:36.740 INFO 80996 --- [ XNIO-2 task-8] c.vaadin.spring.server.SpringUIProvider : Found Vaadin UI [com.web.ui.AdminUI]
2017-01-09 09:26:36.740 INFO 80996 --- [ XNIO-2 task-8] c.vaadin.spring.server.SpringUIProvider : Found Vaadin UI [com.web.ui.DashboardUI]
2017-01-09 09:26:36.740 INFO 80996 --- [ XNIO-2 task-8] c.vaadin.spring.server.SpringUIProvider : Found Vaadin UI [com.web.ui.PagesUI]
2017-01-09 09:26:36.740 WARN 80996 --- [ XNIO-2 task-8] c.vaadin.spring.server.SpringUIProvider : Found no Vaadin UIs in the application context
我正在为 vaadin 使用自定义 servlet,如果我对其进行评论(并使用 vaadin spring boot auto config 提供的默认值),则不会出现 DEBUG 信息...
@Bean(name = "springBootServletRegistrationBean")
public ServletRegistrationBean servletRegistrationBean() {
SpringVaadinServlet servlet = new SpringVaadinServlet() {
@Override
protected VaadinServletService createServletService(DeploymentConfiguration deploymentConfiguration) throws ServiceException {
SpringVaadinServletService service = new SpringVaadinServletService(this, deploymentConfiguration, null) {
...
有人知道我在做什么错吗?