#Create a project from Spring ToolSuite#java
The Spring company, SpringSource provides a full stack solution for Spring development, including excellent IDE support, SpringSource provides an Eclipse based IDE to speed up the development of Spring project.node
##Install Spring ToolSuitegit
You can download a copy of Spring ToolSuite from SpringSource, and install it into your local disk.github
Alternatively, you can get a copy of the JEE bundle from Eclipse website and install Spring ToolSuite plugin manually.web
Note: In the further content, I will use the words IDE or Eclipse, it refers to Spring ToolSuite or Eclipse IDE with Spring ToolSuite plugin installed.spring
Some Maven plugin such as APT needs a JDK instead of JRE at runtime.shell
Open Preference dialog, type JRE in the query text box to find the JRE you are using, change the JRE location to your JDK's location.app
Also do not forget adjust the STS.ini, add -vm
parameter, place it above the -vmargs. An example here.eclipse
<pre> -vm D:/jdk7/bin/javaw.exe ... -vmargs ... </pre>ide
Optionally, install the m2e wtp plugin from Eclipse Marketplace to improve the web application support in Eclipse IDE.
wtp
to search the Eclipse WTP related plugins.##Create a Roo based project
Spring Roo is supported in Spring ToolSuite. You can create a Roo based Spring project from Eclipse directly.
You can open the Roo project wizard from the SpringSource Dashboard(the "Home" page of Spring ToolSuite),
or follow the New project wizard. It is fairly easy work.
After you created such one project, Eclipse should open a Roo shell view for you.
Yes, Spring ToolSuite integrate a command line interface in IDE directly, you can use it freely, just like the one in your system terminal.
##Setup essential artifacts
You can type the addon command the Roo Shell view and use IDE code assistance shortcuts( CTRL+SPACE by default) to get the available options.
Now you can follow the steps in last post and try to create a new Entity Conference in the Eclipse based Roo console.
Open the entity class Conference you have just created in the Roo console, try to add a new property name, and save it. Eclipse will synchronize the change set to the Roo related aspect files, you can some logging info in the Roo console.
Open Conference_Roo_JavaBean.aj in the same package, you will find the getter and setter of the name property are generated.
<pre> privileged aspect Conference_Roo_JavaBean { public String Conference.getName() { return this.name; } public void Conference.setName(String name) { this.name = name; } } </pre>
It is magic.
Follow the steps in last post and add other artifacts yourself.
##Run the project
A developer edition of VMware vFabric Server is shipped with Spring ToolSuite.
Run project in is really simple, just drag the project root node to the server instance and release it.
The project will be deployed into the server.
Open browser, go to http://localhost:8080/<appName>.
##Deploy into CloudFoundry
Firstly make sure you have installed CloudFoundry Eclipse plugin.
If not, you can switch to the Extension tab in the SpringSource Dashboard interface. And find CloudFoundry in the list, click the checkbox before the CloudFoundry item and hint Install button to install it into your IDE.
In the Server view, right click the whitespace and hint the New item in the context menu, and open the New server wizard.
Expand VMware node and select CloudFoundry and press Next button.
Enter your account info of CloudFoundry.com, click Validate Account to check if the email and password is valid.
Click Finish button, you will see a CloudFoundry instance in the Server view.
Right click the CloudFoundry node in the Server view, select Add and remvoe... in the context menu.
In the popup dialog, select the created project and press Add button.
You will see a new application node under the CloudFoundry server instance.
If it is stopped, try to start it by clicking the Start in the context menu. You can also perform a Full publish to deploy a fresh application into CloudFoundry.
Navigate to the application home page.