Upgrade to Thymeleaf and Security Extras 3.1.0-M1

Closes gh-49452
Closes gh-49453
This commit is contained in:
Andy Wilkinson
2022-01-06 13:26:50 +00:00
parent 12cd97a20c
commit 26fecbe230
13 changed files with 140 additions and 105 deletions

View File

@@ -1,6 +1,6 @@
package app
@Grab("thymeleaf-spring5")
@Grab("thymeleaf-spring6")
@Controller
class Example {
@@ -10,24 +10,3 @@ class Example {
return "home"
}
}
@Configuration(proxyBeanMethods = false)
@Log
class MvcConfiguration extends WebMvcConfigurerAdapter {
@Override
void addInterceptors(InterceptorRegistry registry) {
log.info "Registering interceptor"
registry.addInterceptor(interceptor())
}
@Bean
HandlerInterceptor interceptor() {
log.info "Creating interceptor"
[
postHandle: { request, response, handler, mav ->
log.info "Intercepted: model=" + mav.model
}
] as HandlerInterceptorAdapter
}
}