Thymeleaf
를 사용하는 프로젝트에 security
디펜던시를 build
할 때 코드가 누락되지 않도록 주의해야 한다.
IDE
를 인텔리제이로 사용할 경우 start.spring.io에서 build.gradle
코드를 가져오게 되는데, 이 때 add dependencies
를 할 때 thymeleaf
와 spring security
를 같이 등록해야 한다.
왜냐하면 사진 속 두 코드가 필요한데,
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6'
위 코드는 타임리프와 시큐리티를 같이 add
했을 때만 생성되기 때문이다.
+) 뭔가 빌드에서 컴파일 오류나서 thymeleaf-extras-springsecurity5
로 바꿈