Controller and View
패키지하고 컨트롤러 생성ㄱ ㄱ
home.jsp 를 생성하자
디렉토리는 다음과 같이 구성한다.
첨에 view 폴더는 없으니 만들어야 함
그리고 view 폴더 안에 테스트로 적당하게 만들어주자.
![](https://t1.daumcdn.net/keditor/emoticon/face/large/026.png)
Add Spring Security / Spring framework Dependencies
Spring framework 와 Spring security 은 따로 존재하면 서로 호환되는 버전도 다르다.
그리고 동기화되지 않아서 일일히 찾아서 맞춰야한다.
맞는 버전을 찾는 방법은 search.maven.org 홈페이지에서 security를 검색해보면
위와 같이 맞는 버전을 확인할 수 있다. 모두 한 페이지에 존재하는 내용이다..
POM.xml 파일에 위 사진과 같이 내용을 작성한다.
원래 이전에는 dependency에 버전을 직접 작성했는데
이제는 ${ ] 표시를 하고 <properties> 에 있는 내용을 쓸 수 있다.
즉 변수 사용하듯이 쓸 수 있다.
위 내용을 보면 spring framework 말고도
spring security web 과 spring security config가 있는 것을 볼 수 있다.
즉 Spring Security 에는 두 개의 컨텐츠가 필요하다..
지금까지 내용을 그림으로 보면
요렇게 볼 수 있다.
![](https://t1.daumcdn.net/keditor/emoticon/face/large/026.png)
'컴퓨터공학 > Spring & Hibernate' 카테고리의 다른 글
Spring> Security> Login Form (0) | 2021.05.27 |
---|---|
Spring> Security> Basic Security (0) | 2021.05.27 |
Spring> Security> Project Intro (0) | 2021.05.26 |
Spring> Maven> Repository (0) | 2021.05.25 |
Spring> Maven> Create Project (0) | 2021.05.25 |