Wednesday 9 April 2014

Spring Roo-Basic Application


Hello Friends.Hope you all are fine.i am going to introduce you a new topic called Spring Roo. Spring Roo is a tool to facilitate Rapid Application Development.it is based on Roo shell.we can perform action by invoking commands on Roo Shell. well i have used Spring Tool Suite(STS) IDE in order to make simple Application & one thing more to note about it is Maven Based Application.

The Sample Project Structure will look like given below;

everything from creating model bojects to creatingtroller everything is based on invoking commands on Roo Shell.The general way to make Spring Roo Application is as given below:

1) we need to setup Database Provider as well as Database that we will going to use by invoking following command on Roo Shell.
jpa setup --provider HIBERNATE --database MYSQL

after invoking above command all dependancy related to provider will be  downloaded.


2)Create Entity class by invoking following command on Roo Shell.
 entity jpa --class org.student.Student
 [Note: above command will create blank Student Model]

3) add fields into Entity by invoking following command on Roo Shell.
field string --fieldName id
field string --fieldName name
field string --fieldName  college 



4)Create DAO Layer by invoking following command on Roo Shell. :
repository jpa --interface org.student.StudentDAO --entity org.student.Student

5)Create Service Layer  by invoking following command on Roo Shell:
service all --interfacePackage org.student

 6)configure controller by invoking following command on Roo Shell. :
web mvc setup
web mvc scaffold --class org.student.StudentController --backingType



your application is ready & you can perform crud operations on your model.


Thanks for reading this Post
For any query ping me on pathak.nisarg@yahoo.com




 

2 comments:

Spring Boot SSL configuration -Tomcat Server

Hi Friends hope you all are doing well. Today I am going to demonstrate about how to configure SSL in Spring boot web Application. Need o...