Spring 문서 원본 보기
←
Spring
둘러보기로 가기
검색하러 가기
문서 편집 권한이 없습니다. 다음 이유를 확인해주세요:
요청한 명령은 다음 권한을 가진 사용자에게 제한됩니다:
사용자
.
이 문서는 편집하거나 다른 명령을 할 수 없도록 보호되어 있습니다.
문서의 원본을 보거나 복사할 수 있습니다.
Java 기반의 개발 Framework인 Spring을 정리 한다. *홈페이지 : http://www.springsource.org/ *다운로드 : http://www.springsource.org/download *라이선스 : *플랫폼 : Java <br> ==MVC 모델== *Browser :*[[ajax]] :*yui : Yahoo User Interface :*jQuery ::*JavaScript 라이브러리 ::*JavaScript와 Asynchronous JavaScript + XML (Ajax) 프로그래밍을 단순화 ::*Drag & Drop 같은 Dynamic한 페이지 구성 *View :*[[velocity]] ::*JSP를 대체하여 적의양의 코드와 빠른 렌더링 속도를 보장 ::*Templet 방식이기 때문에 다양한 출력양식을 지원함 :*[[JSF]] : Java Server Face :*Tiles *Control :*Spring *Model :*[[hibernate]] ::*ehCache :*[[iBatis]] ==환경 설정== *Library struts2-spring-plugin-2.2.1.jar org.springframework.*.jar */WEB-INF/web.xml <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/classes/spring-common.xml, /WEB-INF/classes/spring-approve.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> */WEB-INF/classes/struts.xml <struts> <constant name="struts.objectFactory" value="org.apache.struts2.spring.StrutsSpringObjectFactory" /> <constant name="struts.objectFactory.spring.autoWire" value="name" /> //--- 클래스명에 Spring에서 정의한 짧은 클래스명을 사용 한다. </struts> *spring-approve.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" xsi:schemaLocation=" http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd" default-autowire="byName"> <bean id="helloWorldAction" class="com.jopenbusiness.gae.approve.action.HelloWorldAction" scope="prototype" /> <bean id="loginAction" class="com.login.LoginAction" scope="prototype" /> </beans> ==동시 세션 제어== *[http://static.springsource.org/spring-security/site/ Spring Security] 3.0을 사용하여 동시 세션 제어 가능 :*Spring Security Feature : concurrent-session-control *HTML :*유효하지 않은 세션 ID에 대해서 URL 리다이렉트 <session-management invalid-session-url="/login.htm" /> *web.xml <listener> <listener-class> org.springframework.security.web.session.HttpSessionEventPublisher 또는 org.springframework.security.ui.session.HttpSessionEventPublisher </listener-class> </listener> *Application Context :*한 사용자가 동시에 두번 로그인하는 것을 방지 (두번째 사용자만 사용 가능) <session-management> <concurrency-control max-sessions="1" /> </session-management> :*두번째 로그인을 방지 <session-management> <concurrency-control max-sessions="1" error-if-maximum-exceeded="true" /> </session-management> 또는 <security:concurrent-session-control max-sessions="1" exception-if-maximum-exceeded="true" /> ==Filter== */WEB-INF/web.xml <filter> <filter-name>EappAuthFilter</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>EappAuthFilter</filter-name> <url-pattern>*.do</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping> *Spring IoC 선언 파일을 다음을 추가 <bean id="EappAuthFilter" class="com.naon.sso.EappAuthFilter" /> ==Annotation== *Annotation :*Java Code에 주석처럼 달아 특수한 의미를 부여해 주는 것으로 컴파일 타임 또는 런타임시 해석 됩니다. *Spring에서 Annotation 사용 선언 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:aop="http://www.springframework.org/schema/aop" '''xmlns:context="http://www.springframework.org/schema/context"''' xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:lang="http://www.springframework.org/schema/lang" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" xsi:schemaLocation=" http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd '''http://www.springframework.org/schema/context ''' '''http://www.springframework.org/schema/context/spring-context-2.5.xsd''' http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd" default-autowire="byName"> <!-- context:annotation-config / --> '''<context:component-scan base-package="anyframe.exercise.service" />''' </beans> *Annotation 사용 예 @Service("simpleService") public class SimpleServiceImpl implements SimpleService { @Resource private ApplicationContext context; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:/web-config/spring-common.xml" }) public class LoggingTest { *참고 문헌 :*[http://hiddenviewer.tistory.com/entry/Java-%EC%96%B4%EB%85%B8%ED%85%8C%EC%9D%B4%EC%85%98Annotation Java Annotation] ==참고 문헌== *[http://dev.anyframejava.org/anyframe/doc/core/3.1.0/corefw/guide/ioc.html 삼성 Anyframe 3.1.0의 Spring 기술 자료의 IoC(Inversion of Control)] *[http://dev.anyframejava.org/anyframe/doc/core/3.1.0/corefw/guide/aop.html 삼성 Anyframe 3.1.0의 Spring 기술 자료의 AOP (Aspect Oriented Programming)] *[http://www.egovframe.go.kr/ 전자정부 표준프레임워크] *[http://credemol.blogspot.com/2011/03/blog-post.html 세션 스코프 빈 사용, 2011.3] [[Category:기술_자료실]] [[Category:Spring]] [[Category:Java]]
Spring
문서로 돌아갑니다.
둘러보기 메뉴
개인 도구
로그인
이름공간
문서
토론
변수
보기
읽기
원본 보기
역사 보기
더 보기
검색
주요 메뉴
오픈소스 컨설팅
오픈소스
오픈소스 라이선스
오픈소스 커뮤니티
오픈소스 종류
오픈소스 현황
오픈소스 한글화
문자셋과 인코딩
Storage
Network
보안
고가용성
모니터링
오픈 API
오픈 서비스
Cloud
BigData
Android
산사랑 노트
둘러보기
인기 문서
최근 수정 문서
모든 문서
모든 분류
임의 문서
위키 사용법
자매 사이트
CMS
오비컨 홈페이지
오비컨 CMS
블로그
데모 - SuiteCRM
산사랑의 Twitter
산사랑의 Facebook
친구 사이트
공개SW 포털
OLIS
한국공개소프트웨어협회
AppCenter 지원본부
OLC
PSEG
개발자 블로그
블로터
개인 메뉴
메뉴 수정
양식함
도구
여기를 가리키는 문서
가리키는 글의 최근 바뀜
특수 문서 목록
문서 정보