오류
'dependencies.dependency.version' for org.thymeleaf.extras:thymeleaf-extras-springsecurity5:jar is missing.
또는
Unresolved dependency: 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5:jar:unknown'
또는
org.thymeleaf.extras:thymeleaf-extras-springsecurity5:jar:unknown was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced
해결
springboot 3.0 이상을 사용하는 상황에서
dependency에 version 정보를 넣어주었더니 의존성 등록이 정상적으로 되었다.
cf. 아마 springboot 2.7.0에서는 version을 명시하지 않아도 돌아가는 것 같다.
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
<version>3.0.4.RELEASE</version> // <= version 추가해주었더니 잘 읽어옴
</dependency>
참고자료
∨ 아래 글을 보면, 스프링부트 3.0 이상의 dependency 설정에서는 위와 같이 <version> 정보를 넣어 쓰고있다.
∨ 반면 2.7.0 버전에서는 <version> 없이도 돌아가는 것 같다. (<= 실습 코드에서도 그러하다)
https://stackoverflow.com/questions/72677959/spring-thymeleaf-security-secauthentication-not-working
Spring thymeleaf security sec:authentication not working
I've searched a lot for this specific problem and currently no methods solving it worked for my project. I'm using spring-boot-starter security v.2.7.0 and thymeleaf-extras-springsecurity5. The pro...
stackoverflow.com
'JAVA > Application' 카테고리의 다른 글
[자바/스프링] 비즈니스 로직 층 설계 (0) | 2023.08.12 |
---|---|
[자바/스프링] 데이터 액세스 층 설계 (0) | 2023.08.11 |
[JPA] Entity는 영속성 컨텍스트에 저장/조회한다! (4) | 2023.01.25 |
Springboot Mybatis 사용해보기 ─ xml 파일로 쿼리문 관리 (0) | 2023.01.23 |
Spring MVC | Controller는 어떻게 요청을 처리하는 걸까? | Controller와 Servlet (0) | 2023.01.19 |