Certification/Spring(2V0-72.22, SCP) 24

What is the difference between checked and unchecked exceptions?

What is the difference between checked and unchecked exceptions? Checked exception Unchecked exception 예외 발생 컴파일시 예외 catch부에서 처리 런타임 도중 발생하는 catch되지 않은 예외 예외 처리 예외처리 필수 예외처리 필수 아님 트랜잭션 처리 롤백하지 않음 롤백함 예시 IOException, SQLException, ClassNotFoundException, InvocationTargetException NullPointerException, IndexOutOfBoundsException, IllegalArgumentException, NumberFormatException Why does Spring prefe..

What is the concept of AOP? Which problem does it solve? What is a cross cutting concern?

What is the concept of AOP? Which problem does it solve? What is a cross cutting concern? Name three typical cross cutting concerns. What two problems arise if you don’t solve a cross cutting concern via AOP? What is the concept of AOP? Introduction Aspect-oriented programming (AOP) is an approach to programming that allows global properties of a program to determine how it is compiled into an e..

What is dependency injection and what are the advantages of using it?

'dependency injection' definition In software engineering, dependency injection is a technique in which an object receives other objects that it depends on, called dependencies. Typically, the receiving object is called a client and the passed-in object is called a service. The code that passes the service to the client is called the injector. 'Wikipedia' 소프트웨어 공학에서 의존성 주입은 의존이 필..

Spring MVC - 게시판 페이징 처리

Spring MVC - 게시판 페이징 처리 SQL 부분 - 오라클 기준1. 전체 데이터 가져오기 (게시물 번호 컬럼을 이용해서 내림차순 정렬 하였다)1234select bno, title, writer, name, regdate, viewcntfrom board b, member mwhere b.writer = m.useridorder by bno desc;Colored by Color Scriptercs 2. 정렬된 데이터에 rownum을 활용해 행번호를 부여1234567select rownum as rn, A.*from (select bno, title, writer, name, regdate, viewcnt from board b, member m where b.writer = m.userid or..

iBatis Mapper Null 값 치환하기

insert into tb_m_erpdata (t_seq, date, t_cnt, t_erpcnt, start, end, regdate, status, chcnt, message) values (SEQ.nextval, sysdate, #t_cnt:INTEGER:-999999#, #t_erpcnt:INTEGER:-999999#, #start:VARCHAR:NO_ENTRY#, #end:VARCHAR:NO_ENTRY#, #regdate:DATE:NO_ENTRY#, #status:CHAR:NO_ENTRY#, #chcnt:INTEGER:-999999#, #message:VARCHAR:NO_ENTRY#) Insert할때 널값이 들어오면 iBatis에서 처리해준다 iBatis 사용시 NULL 에 대한 주의 할 점. ..

Controller @RequestMapping 리턴 타입

ModelAndView1234567@RequestMapping("list.do")public ModelAndView list(int bno, ModelAndView mav) { List list=replyService.list(bno); //댓글 목록 mav.setViewName("board/reply_list"); //뷰의 이름 mav.addObject("list", list); //뷰에 전달할 데이터 저장 return mav; //뷰로 이동}Colored by Color Scriptercs String12345@RequestMapping("delete.do")public String delete(int bno) throws Exception { boardService.delete(bno); //삭제 ..

View에 데이터 전송을 위한 Model 개념

※ @RequestMapping 어노테이션이 적용된 메소드의 파라미터나 리턴 타입으로 ModelAndView, Model, ModelMap, Map, 커맨드 객체 등을 이용해서 모델을 뷰에 전달 뷰에 전달되는 모델 데이터- @RequestMapping 메소드가 ModelAndView, Model, Map을 리턴하는 경우 이들에 담긴 모델 데이터가 뷰에 전달- 추가적으로 다음의 항목도 뷰에 함께 전달 * 커맨드 객체 * @ModelAttribute 어노테이션이 적용된 메소드가 리턴한 객체 * 메서드의 Map, Model, ModelMap 타입의 파라미터를 통해 설정된 모델 123456789101112131415161718192021222324252627282930313233343536373839404142..