Bean definition fix for thymeleaf