Notice
Recent Posts
Recent Comments
목록Call (1)
송민준의 개발노트
mybatis procedure 사용법
Spring 및 mybatis가 세팅이 되어 있다는 가정 하에 사용법이다. (먼저 서비스단에서 DAO 가 DI 됨) 1. 서비스단 objectDAO.call("리소스이름", 파람데이터); if(!"식별값".equals(파람데이터.get("에러코드")) { throw 어떤Exception("~", 파람데이터.get("에러메시지").toString()); } 2. DAO @Autowired private SqlSessionTemplate sqlSession; public Object call(String sql, Map(또는 커스텀Object) map) throws Exception { return sqlSession.update(sql, map); } 3. XML {call 프로시저명( #{파람1,mode..
웹/Spring Framework
2020. 10. 19. 13:04