개발/Framework || Lib25 Spring+iBatis 트랜잭션 @Transactional( readOnly=false, propagation=Propagation.REQUIRES_NEW, rollbackFor={SQLException.class,Exception.class}, noRollbackFor={NoRollbackException.class}) 잘은 모르겠지만 @Component에서 트랜잭션 public으로 선언해야 트랜잭션이 적용됨. protected로 선언하면 트랜잭션 적용이 안됨 ++ @Autowired @Qualifier("sqlMapClientTemplate") private SqlMapClientTemplate sqlMapClientTemplate; public void setSqlMapClientTemplate(SqlMapClientTemplat.. 2008. 9. 9. Spring Annotation2개 url 사용하기 Spring 어노테이션 2개 url 사용하기 @RequestMapping({"/MMGLB0040I.do", "/MMGLB0050I.do"}) Spring 어노테이션 url @RequestMapping("/MMGLB0050I.do") 원문 : http://forum.ksug.org/viewtopic.php?f=5&t=169&p=657 2008. 8. 27. ibatis like절 처리 출처: http://theeye.pe.kr/186 MySQL : SELECT * FROM tbl_name WHERE column_name LIKE "%$username$%" ORACLE : SELECT * FROM tbl_name WHERE column_name LIKE '%' || #username# || '%' SYBASE/SQL SERVER SELECT * from tbl_name WHERE column_name LIKE '%' + #username# + '%' 2008. 8. 22. ibatis <abotro> sort - 아바터 정렬 출처 : http://kyungseo.pe.kr/blog/tag/92 package xxx.business.sys.domain; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; public class RoleExample { /** * This field was generated by Abator for iBATIS. * This field corresponds to the database table TM_XXX_ROLE * * @abatorgenerated Wed Nov 28 17:31:32 KST 2007. */ private Str.. 2008. 8. 12. 이전 1 2 3 4 5 6 7 다음