Open fapdash opened 6 years ago
This isn't Thymeleaf issue but rather the way how Spring Security is configured by default in Spring Boot (the filter doesn't bind to ERROR requests and that's why authentication info isn't available on error pages). This has been fixed in Spring Boot >= 2.0: https://github.com/spring-projects/spring-boot/issues/8289
But for 1.5, you need to add the following configuration:
security.filter-dispatcher-types: ASYNC, REQUEST, ERROR
I've noticed that the extras provided by this package don't seem to be available when rendering the Spring error pages after an Exception. (e.g.
error.html
)${#authentication.name}
fails with a NPE. Elements withsec:authentication="name"
don't get rendered.Is this a problem with my configuration or is this a limitation of thymeleaf-extras-springsecurity?
My thymeleaf dependencies (with Spring Boot 1.5.10):