'Grails N'에 해당되는 글 2건
- 2012.12.29 Grails - 2.2.0
- 2011.10.22 Grails - 1.3.7
- Grails - 2.2.0
- 日常茶飯事
- 2012. 12. 29. 03:55
Grails가 버전이 올라가면서 많은 부분이 바뀌었다.
개발환경에 대화형 모드를 사용했고
자동 완성 기능도 지원한다. Grails 명령어만 지원하는게 아니고, 패키지명에도 지원된다.
HSQLDB 대신 H2를 사용함. 1Database Console 제공
UI도 변경되었음.
기본적으로 jQuery를 사용
그리고 메세지가 한글이 지원된다. 2
- Hello World Example
개발환경에 대화형 모드를 사용했고
자동 완성 기능도 지원한다. Grails 명령어만 지원하는게 아니고, 패키지명에도 지원된다.
HSQLDB 대신 H2를 사용함. 1Database Console 제공
UI도 변경되었음.
기본적으로 jQuery를 사용
그리고 메세지가 한글이 지원된다. 2
- Hello World Example
> grails create-app helloworld
> cd helloworld
> grails
grails> create-controller hello
> cd helloworld
> grails
grails> create-controller hello
grails-app/controllers/helloworld/HelloController.groovy
def index() { render "Hello World!" }
grails> run-appdef index() { render "Hello World!" }
- Grails - 1.3.7
- 日常茶飯事
- 2011. 10. 22. 07:58
- Grails Quick Start
- Create project
- Create Domain class
D:\reps\grails_workspace\bookstore\grails-app\domain\bookstore\Book.groovy
D:\reps\grails_workspace\bookstore\grails-app\controllers\bookstore\BookController
http://localhost:8080/bookstore/
- 프로젝트 이름에 -, .을 사용하지 말것.
trip-planner : domain, controller는 trip/planner/로 생기는데 view는 trip/만 생김
trip.planner : 상동
tripPlanner : tripplanner/로 생김
- Create project
> grails create-app bookstore
> cd bookstore
> cd bookstore
- Create Domain class
> grails create-domain-class Book //패키지를 지정하지 않으면 프로젝트명으로 패키지가 구성된다.
> grails create-domain-class com.example.Book
> grails create-domain-class com.example.Book
D:\reps\grails_workspace\bookstore\grails-app\domain\bookstore\Book.groovy
package bookstore class Book { String title String author }- Create controller
>
grails create-controller Book
D:\reps\grails_workspace\bookstore\grails-app\controllers\bookstore\BookController
package bookstore class BookController { // def index = { } def scaffold = Book }- Run Application
> start grails run-app
http://localhost:8080/bookstore/
- 프로젝트 이름에 -, .을 사용하지 말것.
trip-planner : domain, controller는 trip/planner/로 생기는데 view는 trip/만 생김
trip.planner : 상동
tripPlanner : tripplanner/로 생김
Recent comment