민서네집

Spring Security 3.2 본문

Spring

Spring Security 3.2

브라이언7 2015. 3. 26. 15:53

Spring 4 버전에서 Spring Security 3.1 을 돌리니, Spring 3 버전이 아니라고 에러 메시지가 뜬다.

정보: Initializing Spring root WebApplicationContext

2015-03-26 16:06:18,475 ERROR {localhost-startStop-1} [org.springframework.security.core.SpringSecurityCoreVersion] (SpringSecurityCoreVersion.java:35) - *** Spring Major version ''3'' expected, but you are running with version: 4.1.6.RELEASE. Please check your classpath for unwanted jar files.


그런데 이상하게도 실행(로그인, 로그아웃)에는 지장이 없었다.

Spring Security 설정 파일(맨 윗 부분)에서 

xsi:schemaLocation="

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans-4.1.xsd

http://www.springframework.org/schema/security

http://www.springframework.org/schema/security/spring-security-3.2.xsd">

spring-security-3.1.xsd 를 spring-security-3.2.xsd 로 바꾸고, Spring Security 3.1 을 3.2 로 업그래이드 했다.

pom.xml 파일 (일부분)

<properties>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<springframework.version>4.1.6.RELEASE</springframework.version>

<springsecurity.version>3.2.7.RELEASE</springsecurity.version>

<thymeleaf.version>2.1.3.RELEASE</thymeleaf.version>

<thymeleafspringsecurity3.version>2.1.1.RELEASE</thymeleafspringsecurity3.version>

<thymeleaf-layout-dialect.version>1.2.5</thymeleaf-layout-dialect.version>

<mysql.connector.version>5.1.30</mysql.connector.version>

</properties>


<!-- Spring Security -->

<dependency>

<groupId>org.springframework.security</groupId>

<artifactId>spring-security-core</artifactId>

<version>${springsecurity.version}</version>

</dependency>

<dependency>

<groupId>org.springframework.security</groupId>

<artifactId>spring-security-web</artifactId>

<version>${springsecurity.version}</version>

</dependency>

<dependency>

<groupId>org.springframework.security</groupId>

<artifactId>spring-security-config</artifactId>

<version>${springsecurity.version}</version>

</dependency>


내 STS (Spring Tool Suite) 에서

Method 'setFilterProcessesUrl' is marked deprecated

Method 'setLoginFormUrl' is marked deprecated ( ☞ Spring Security 3.1 버전에서도 남 )


위와 같은 Warnings 가 뜨는데, 검색해 보니 뚜렷한 해결책이 없고, 신경쓰지 말라는 글을 봐서 그냥 놔두기로 했다.

Spring Security의 설정 방법이 바뀌었을 수도 있을것 같은데, 나중에 시간 날때 Spring Security에 대해서 좀 더 공부해 두어야 겠다.


Creating a Custom Login Form


http://docs.spring.io/autorepo/docs/spring-security/3.2.x/guides/form.html


Spring Security Homepage


http://projects.spring.io/spring-security/   




Spring Security 4.0.0 버전은 3.x 버전에서 무엇이 바뀐 것일까?


Spring Framework Homepage


http://projects.spring.io/spring-framework/


Spring Guides


http://spring.io/guides


☞ Uploading Files

☞ Securing a Web Application



Comments