http://www.springsource.com/training/spr001/icn20090302/?geonr&__utma=1.2971782686416582000.1231936752.1231936752.1231936752.1&__utmb=170440930.1.10.1231936760&__utmc=170440930&__utmx=-&__utmz=1.1231936752.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)&__utmv=-&__utmk=80448919

이야.. 그러나.. 가격이. ㅠ.ㅠ

Spring 3.0

자바/스프링 2008/07/24 10:14 posted by 낭만검객
- Q3, 2008

- Moves to Java 5+ basis

- Further improvements in Spring MVC will provide a unified programming model between Spring MVC and Spring Web Flow to handler the full range of web programming requirements

- Comprehensive REST support across Spring MVC and Spring Web Services

출처: http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-6169.pdf?cid=925649

ResourceBundle 파일의 한글문제

자바/스프링 2008/02/23 19:01 posted by 낭만검객
ResourceBundle은 간단한 설정을 저장하기에 적합한 파일입니다. 그러나 한글을 자유롭게 쓰지 못하고 변경 내용을 자동으로 읽을 수 없습니다. 이 두 가지 문제점을 해결하기 위해 어려 해결책이 있지만 스프링의 ReloadableResourceBundleMessageSource이 쉽고 편합니다.

import org.springframework.context.support.ReloadableResourceBundleMessageSource;

ReloadableResourceBundleMessageSource
 bundle = new ReloadableResourceBundleMessageSource();

bundle.setBasename("config"); // config.xml, config.properties 등의 파일을 찾도록 설정
bundle.setCacheSeconds(60); // 1분 단위로 설정 파일 변경 여부 검사

bundle.getMessage("greeting", new String[] {"cybaek"}, null); // 세 번째 인자는 Locale
config.xml 번들 파일입니다.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "
http://java.sun.com/dtd/properties.dtd
">
<properties version="1.0">
 <entry key="greeting">Hello {0}!</entry>
</properties>


참조:
스프링 레퍼런스:
http://static.springframework.org/spring/docs/2.5.x/api/index.html
스프링 소스: spring-framework-2.5.1/test/org/springframework/context/support/ResourceBundleMessageSourceTests.java

SimpleFormController를 이용해서 작업 처리 뒤 대개 특정 주소로 리다이렉트를 합니다. 대표적인 예를 들어보겠습니다.

edit.do?docId=56 이 주소에서 문서를 수정합니다. “확인” 버튼을 누르면 read.do?docId=56으로 가야하는데 views.properties에는 ? 뒷 부분을 지정할 수 없어 이런 저런 꼼수를 쓰곤 합니다.

아주 흔한 경우입니다. 당연히 스프링에는 이 문제를 깨끗하게 해결할 수 있는 방법이 있습니다

다음처럼 views.properties에 class를 정의합니다.

editSuccess.class=org.springframework.web.servlet.view.RedirectView
editSuccess.http10Compatible=false
editSuccess.contextRelative=true
editSuccess.url=/list.page

docId 매개변수를 read.do에 붙이고 싶다면 ModelAndView 객체의 model에 docId란 이름으로 값을 넣으면 됩니다.

mv.put(”docId”, 56);

스프링의 RedirectView 클래스 소스를 참조하시면 더 쉽게 이해하실 수 있습니다.