Framework/Spring Boot

[Error] Error creating bean with name 'thymeleafViewResolver' defined in class path resource

잔망루피 2021. 10. 24. 10:10

springsecurity를 사용하기 위해 build.gradle에 의존성 추가 후 아래와 같은 에러가 떴다.

에러 로그가 워낙 길어서 필요한 부분만 가져왔다.

Error creating bean with name 'thymeleafViewResolver' defined in class path resource
Error creating bean with name 'templateEngine' defined in class path resource
Failed to instantiate [org.thymeleaf.spring5.SpringTemplateEngine]: Factory method 'templateEngine' threw exception;
Error creating bean with name 'securityDialect' defined in class path resource
Failed to introspect Class [org.thymeleaf.extras.springsecurity5.dialect.SpringSecurityDialect] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@2437c6dc]

 

 

✨ 해결

compile "org.springframework.boot:spring-boot-starter-security"

build.gradle의 dependencies에 추가했다.

역시 스프링 docs에서 찾아야 정확하다.

블로그에서 복붙했더니 에러가 떴었다.ㅠㅠ

 

 

 

참고 👉 https://docs.spring.io/spring-security/site/docs/current/reference/html5/#getting-gradle

 

Spring Security Reference

In Spring Security 3.0, the codebase was sub-divided into separate jars which more clearly separate different functionality areas and third-party dependencies. If you use Maven to build your project, these are the modules you should add to your pom.xml. Ev

docs.spring.io

 

반응형