A new thymeleaf-extras-springsecurity5 artifact has been released that provides Thymeleaf integration with Spring Security 5 (5.0 and 5.1's current snapshots). Support is both for Spring MVC and Spring WebFlux apps. See more here and at the package's Github repo.
Please consider adopting this new package (version 3.0.3.RELEASE) instead of the thymeleaf-extras-springsecurity4 currently being used for Spring Boot 2.1's dev branch.