Sunday 20 April 2014

Spring Hello World with Apache Maven

Hello Friends .Hope you all are fine .today i am going to demonstrate you how we can develop Maven Based Application .Apache Maven can be used as a build tool which can add dependancy when project is created.the heart of Maven based Application.

You can download Apache Maven from its Official Site us  Maven Installation

This is how you can set your claspath
 


You have to download apache maven from official site of maven as well as you need to set classpath to make maven work,i am posting steps as given below

Project Structure will look like given below :


1)You need to Create Project on Command Line by Invoking Following Command :
mvn archetype:generate -DgroupId=Package_Name -DartifactId=ProjectName -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

2)Convert it into Maven project:
mvn eclipse:eclipse    

3)Import Project Into Eclipse

4) Run the Application

here it is Hello World is Ready .Output will look like given below

Thanks For Reading This Article






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




 

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...