☆ 전체소스 : spring305.zip
BoardVO.java
package sp.mvc.board.vo;
public class BoardVO { private int boardSeq; ......
public String getModiUser() { |
BoardController.java
package sp.mvc.board.controller; import org.springframework.beans.factory.annotation.Autowired; import sp.mvc.board.service.BoardService;
@Controller |
BoardServiceImpl.java
package sp.mvc.board.service; import org.springframework.beans.factory.annotation.Autowired; import sp.mvc.board.dao.BoardDao;
@Component
@Autowired } |
BoardDaoImpl.java
package sp.mvc.board.dao; import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
public class BoardDaoImpl extends SqlMapClientDaoSupport implements BoardDao { @Override } |
LogAspect.java
package sp.mvc.aop; import org.aspectj.lang.JoinPoint;
@Aspect
@Pointcut(value="execution(* sp.mvc..*.*(..))") |
web.xml
<?xml version="1.0" encoding="UTF-8"?> <filter> <filter-mapping>
|
applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"
|
pjt_main_config.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" <aop:aspectj-autoproxy/>
</beans> |
SqlMapConfig.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMapConfig
<sqlMapConfig> <settings useStatementNamespaces="true"/> <sqlMap resource="/query/board/board.xml"/> </sqlMapConfig> |
board.xml
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMap
<!-- Mapper 파일 --> <!-- <resultMap id="r_boardVo" class="sp.mvc.board.vo.BoardVO">
|
결과
요청 URL http://localhost:8090/spring305/boardDetail.sp?seq=157
***** before ***** |
'프로그램 > Spring 3.0' 카테고리의 다른 글
스프링의 트랜잭션 관리 - 선언적 트랜잭션(@Transactional) (1) | 2012.05.25 |
---|---|
스프링의 트랜잭션 관리 - 선언적 트랜잭션(<tx:advice>) (0) | 2012.05.25 |
[예제] 게시판 상세보기 샘플소스(@Autowired, @Component, @Controller, aop 태그 적용) (0) | 2012.05.24 |
커스텀 View - JSON 응답(MappingJacksonJsonView) (0) | 2012.05.23 |
커스텀 View - PDF 다운로드(AbstractPdfView) (0) | 2012.05.23 |