블로그 이미지
올해목표 // 10월 어학연수 떠나자~ 자수씨

카테고리

전체글 (1457)
Brand New! (28)
주절주절 (213)
MOT (11)
해외쇼핑 (49)
쇼핑노트 (150)
취미생활 (94)
iPhone (4)
Eclipse (121)
Google (83)
Spring (31)
JAVA (176)
JavaScript (59)
WEB (49)
Database (20)
OS (26)
Tools (8)
Tips (26)
IT정보 (1)
Book (21)
Programming (37)
외부행사 (43)
주변인들 (17)
여행노트 (60)
학교생활 (30)
회사생활 (52)
사회생활 (5)
외국어공부 (12)
잡동사니 (30)
Total
Today
Yesterday
 
05-01 09:39
 

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
 

최근에 올라온 글

최근에 달린 댓글



지금까지 Spring Roo 를 디버깅하기 위해 오랬동안 돌아왔습니다.
이제 그 결실을 맞보러~


Spring Roo addon 디버깅

1. 새로운 roo 프로젝트 생성

> roo-dev

Listening for transport dt_socket at address: 6889
    ____  ____  ____
   / __ \/ __ \/ __ \
  / /_/ / / / / / / /
 / _, _/ /_/ / /_/ /
/_/ |_|\____/\____/    1.1.5.RELEASE [rev d3a68c3]

Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
roo>

dt_socket 6889 번 포트로 리스닝 중이라는 멘트와 함께 Roo Shell 이 실행되었습니다.

아래의 roo script 를 이용하여 프로젝트를 구성합니다.

project --topLevelPackage kr.co.vicki.roo.sample.rentshop
persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY
entity --class ~.domain.Car --testAutomatically
field string --fieldName modelName --notNull
field number --fieldName displacement --type java.lang.Integer --notNull 0
entity --class ~.domain.Customer --testAutomatically
field string --fieldName name --notNull
entity --class ~.domain.Rent --testAutomatically
field reference --fieldName car --type ~.domain.Car --notNull
field number --fieldName period --type java.lang.Integer --notNull 0



2. STS 디버깅 환경 설정

이전 포스트에서 설정한 포트를 이용하여 Remote Java Application 설정을 구성합니다.






3. Web MVC Controller Add-on 디버깅

프로젝트도 만들었고 디버깅할 수 있는 환경도 구성되었습니다.

org.springframework.roo.addon.web.mvc.controller 프로젝트의 아래 소스코드를 열어서 중단점을 설정합니다.
/org.springframework.roo.addon.web.mvc.controller/src/main/java/org/springframework/roo/addon/web/mvc/controller/ControllerOperationsImpl.java



위에서 구성하였던 Remote Java Application 를 실행합니다.


아래와 같이 roo 명령을 실행하면 STS 에서 디버깅이 가능합니다.

    ____  ____  ____
   / __ \/ __ \/ __ \

  / /_/ / / / / / / /
 / _, _/ /_/ / /_/ /
/_/ |_|\____/\____/    1.1.5.RELEASE [rev d3a68c3]


Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
roo> controller all --package ~.web


처음 디버깅 할 경우 source 에 대한 경로 설정이 되어 있지 않기 때문에 아래의 캡쳐 이미지를 참조하여 source 를 설정합니다.



이제~ Spring Roo Add-on 소스 중단 점을 디버깅 할 수 있게 되었습니다.




실제로 addon 을 개발하고 디버깅하는 것은 아니였지만, 제공되는 addon 을 디버깅 함으로써 flow 를 파악할 수 있게되었습니다.
후훗~





Posted by 자수씨
, |

글 보관함

최근에 받은 트랙백