그동안 간단한 클래스 하나 추가 하려고 해도
ActionClass, ServiceClass, ... 클래스 이에 맞는 Interface
또 struts, spring, iBatis 설정들까지 생각하면 배보다 배꼽이 더 커지는 경우가 있다.
이 참에 Anotations 으로 설정을 대신하는 방법으로 적용해 보았다.
우선순위와 장단점이 있겠지만, 적당히 사용하면 좋을듯 하다.
별도의 bean을 설정하지 않았다.
Anotations 에 관한 내용은 구차니즘.. ㅠㅠ
아래 참고사이트에 너무 잘 되어있다~ ㅎ
참고 : http://jjaeko.tistory.com/20
'spring'에 해당되는 글 2건
- 2009/11/27 Spring2.5 Anotations
- 2008/02/19 Spring 에서 DWR 사용하기
View Comments,
Trackbacks
기본적인 DWR 사용 설정은 흰둥이님 강좌를 참조 : http://cafe.naver.com/javalove/1588
dwr.xml
<dwr>
<allow><!-- Ad -->
<create creator="spring" javascript="AdService">
<param name="beanName" value="adService" />
</create>
<convert converter="bean" match="ad.domain.AdCost" />
<!-- Code -->
<create creator="spring" javascript="CodeService">
<param name="beanName" value="codeService" />
</create>
<convert converter="bean" match="product.domain.Code" />
</allow>
</dwr>
MyAppContext.xml
<beans>
<bean id="adService" class="ad.service.AdServiceImpl">
<property name="adDAO" ref="adDAO" />
</bean>
<bean id="codeService" class="product.service.CodeServiceImpl">
<property name="codeDAO" ref="codeDAO" />
<property name="productDAO" ref="productDAO" />
</bean>
</beans>
wex.xml
<context-param>
<param-name>spring-context</param-name>
<param-value>/WEB-INF/context/MyAppContext.xml</param-value>
</context-param><listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
View Comments,
Trackbacks
댓글을 달아 주세요