레이블이 Spring인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Spring인 게시물을 표시합니다. 모든 게시물 표시

2010년 5월 17일 월요일

Spring seucrity 2.0 태그 사용하기

<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<!-- 권한에 따라 페이지에서 보여주는 것을 달리하기 위해 authorize 태그를 사용할 수 있다. -->
<sec:authorize ifNotGranted="ROLE_USER">
<a href="<s:url value="/public/blog/login.jsp"/>">로그인</a>
</sec:authorize>
<sec:authorize ifAnyGranted="ROLE_USER, ROLE_ADMIN">
<b><sec:authentication property="principal.username"/></b>님 반갑습니다. <br>
<a href="<s:url value="/j_spring_security_logout"/>">로그아웃</a>
</sec:authorize>
 
수정 및 삭제 버튼도 위에서 사용한 authorize 태그를 사용해서 로그인 상태에 따라 보여주거나 보여주지 않을 수 있다.

authentication 태그를 사용하여 현재 로그인된 사용자의 정보를 확인할 수 있다.

* Spring Security Tag Library *
- authentication 태그
 property="principal.username" 설정으로 현재 로그인 된 사용자의 username을 확인 할 수 있다.
- authorize 태그
 현재 로그인 된 사용자가 해당되는 권한에 따라, 태그 안에 포함된 내용을 보여주거나 보여주지 않을 수 있다.
 
 ifAllGranted 속성: 사용자가 나열된 모든 권한에 해당할 경우 태그 안에 포함된 내용을 보여준다.
 ifAnyGranted 속성: 사용자가 나열된 권한 중 한가지에라도 해당할 경우 태그 안에 포함된 내용을 보여준다.
 ifNotGranted 속성: 사용자가 나열된 권한 중 한가지에라도 해당할 경우 태그 안에 포함된 내용을 보여주지 않는다.

2010년 4월 1일 목요일

Spring Roo Getting Started

1. Spring Roo 다운
springsource.org(http://www.springsource.org/download) 를 방문하여
Spring Roo 최신버전(Spring Roo 1.0.2)을 다운받는다.

2. 다운받은 spring-roo-1.0.2.RELEASE.zip 화일을 압축을 푼다.

3. 압축을 푼 경로 클래스 패스 추가
 ex) C:\spring-roo-1.0.2.RELEASE\bin

4. 콘솔창에서 roo 입력

5. 테스트 프로젝트 실행
1) sample 폴더의 wedding.roo 파일을 참고하여 프로젝트를 생성한다.
2) perform eclipse 까지 실행하고 나면 eclipse를 열고, 생성된 프로젝트 import 한다.

6. eclipse 프로젝트에서 톰켓 서버를 설정하고, 실행하면 다음과 같은 화면이 뜬다.


2009년 8월 20일 목요일

SpringSource.org를 VMware가 인수

SpringSource Joins Forces with VMware

Today SpringSource announced that it is being acquired by VMware, the global leader in virtualization solutions from the desktop to the datacenter. Rod Johnson covers the details of the acquisition in his blog post: SpringSource: Chapter Two. In particular, he gives a special message to the community:

Sleep easy – our commitment to open source practices, licenses and traditions will remain unchanged. We expect our contributions to open source to increase. Our open source projects will retain their commitment to enabling user choice. Spring will retain the portability between deployment environments that empowers users.

The combination of the two companies will provide some incredibly exciting technology and make development for cloud based solutions even easier. Congratulations to Rod and all the SpringSource technologists that have worked so hard to deliver great technology and build a successful business. Feel free to discuss the news in the community forums.