Sitemap

Spring Roo basic example with PostgreSQL

3 min readNov 5, 2015

--

Let’s do some initial tests with Spring Roo Project to see if we include it in the project development environments Learning Project. To make a development as quickly as possible and make an assessment we will use a single table from those reflected in the draft here you have all the information.

Spring Roo

A next-generation rapid application development tool for Java developers. With Roo you can easily build full Java applications in minutes.Spring Roo

Ultimately we will see that we can generate CRUD application with Spring Roo for the customerdbroo database where we will create the cb_language table with the following database structure:

cb_language

Table with the languages on the application, it could be related to multiple tables.

In this tutorial we will learn to make a Web application from scratch using Spring Roo, what we do:

Spring Roo characteristics

Spring Roo is presented as a lightweight tool to more quickly achieve instant results, we will see if they are suited to our basic needs, the generated code is Java so we understand that we can customize the generated code, we’ll check it.
Spring Roo aims to to differentiate from other tools by::

  • Rapid results
  • 100% develop in Java
  • Easy-to-use
  • Fast and simple to remove
  • Totally compromise free
  • Active, helpful community
  • Comprehensive technology integrations
  • Extension points via Roo add-ons
  • Spring-certified architecture

Prepare the enviroment

For these tests we will work with the environment provided by Spring Tool Suite (STS), here you can download the version you need for your operating system, Spring Tool Suite (STS) provides support for Spring Roo 2.0.0 is available from STS 3.7.0, in the download link you will found all the information.

Get Julio Yáñez Novo’s stories in your inbox

Join Medium for free to get updates from this writer.

Now we are going to include Roo in our STS IDE:

  • Open your STS IDE
  • Open the STS dashboard
  • Click on Extensions bottom tab and search Spring Roo.
  • Install Spring IDE — Roo Extension.
  • Restart STS

Configuring Spring Roo 2.0.0 in your STS:

  • Open “Preferences > Spring > Roo Support”
  • On “Roo Support” we click the “Add” button for the installation
  • In “Roo Configure Roo Installation” click the “Browse” button, then select the directory where you unzipped Spring Roo 2.0.0
  • Confirm the installation
  • Now Roo is installed on your STS IDE

With this we let our IDE configurated to use Spring Roo.

Now we just need to install PostgreSQL on our computer if we have not already installed, in the post PostgreSQL Tutorial (1): Setting the environment have all the necessary information and links for downloading and basic configuration.

If you want to develop here you can follow step by step: http://codigoxules.org/en/spring-roo-ejemplo-basico-con-postgresql/

Documentation used

  • Spring Roo Project: Project home page, from here you can access all documentation.
  • Spring Roo and JPA Entities: explanation and clarification of the relationship between entities in Spring Roo.
  • Apache Maven
  • Maven in five minutes: if you have no knowledge of Maven, here’s a basic introduction.
  • For questions you can use StackOverflow Spring Roo, where they help us to solve our doubts and thereby help to better understand the tool
  • Add-ons: I add the interesting link that bring me in comments on an add-on suite that seem interesting development with Spring Roo: gvNIX. Incluye funcionalidades como integración con jQuery, Bootstrap, Dandelion-datatables, Auditoria con Histórico de cambios, Jasper Reports… contribution by Jose Manuel Vivó Arnal

I hope it has been useful for you.

Xules

Originally published at codigoxules.org on November 5, 2015.

--

--

Julio Yáñez Novo
Julio Yáñez Novo

Written by Julio Yáñez Novo

Software engineer #Java #OpenXava #MySQL #PostgreSQL #Primefaces #php | Trail runner — beginner swimmer | #ecommerce #marketing | Happy married | Father 3 kids