我成功运行了以下示例(简单的 Spring Web 应用程序): https ://www.youtube.com/watch?v=GTrNkhVnJBU
现在我想在一个基于 Spring Boot 和 Vaadin TouchKit 的项目中使用 Spring Loaded。
当我进行更改时(例如 ComboBox 的新标题),Spring Loaded 似乎可以识别它:
2015-09-03 10:23:08.823 INFO 1956 --- [Loader@799dbc3b] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2015-09-03 10:23:08.823 INFO 1956 --- [Loader@799dbc3b] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2015-09-03 10:23:08.831 INFO 1956 --- [Loader@799dbc3b] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2015-09-03 10:23:08.831 INFO 1956 --- [Loader@799dbc3b] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2015-09-03 10:23:08.842 INFO 1956 --- [Loader@799dbc3b] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2015-09-03 10:23:08.843 INFO 1956 --- [Loader@799dbc3b] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
2015-09-03 10:23:08.870 INFO 1956 --- [Loader@799dbc3b] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2015-09-03 10:23:08.870 INFO 1956 --- [Loader@799dbc3b] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
但是按 F5 刷新浏览器后,我看不到变化(组合框的标题与以前保持一致)。
我错过了什么吗?在 Spring Loaded 与 Vaadin TouchKit 一起工作之前,我还需要做其他事情吗?
感谢您的阅读以及您可能提前获得的任何提示!
编辑:
当我在简单的 Spring Web 应用程序示例中进行更改时,我得到以下日志输出:
2015-09-03 10:51:06.503 INFO 8388 --- [Loader@14dad5dc] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto java.lang.String ???.???.tests.springloaded.SpringLoadedController.home()
2015-09-03 10:51:06.504 INFO 8388 --- [Loader@14dad5dc] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2015-09-03 10:51:06.504 INFO 8388 --- [Loader@14dad5dc] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest)
所以上下文“/”似乎在那里更新,但不是在 TouchKit 应用程序中。