Complete Web Application: Angular Twitter Bootstrap Spring MVC, Data and Security

137

Posted on November 3, 2013 by

Share it now!

Hello, how are you?

Today we will see how to create a complete Java web application using Spring, Angular, JQuery, Twitter Bootstrap, Tiles, Maven, Tomcat, JPA/Hibernate.

The project that will be done here in this post will be used in another post that I will write, because of this future post, in this post will be described a detailed environment configuration. I will be using linux as my operational system (OS), but almost nothing will change if you use Windows or other OS.

I received a lot of emails asking for a post using Spring in a full web application, all the applications already posted here were using JEE technology (JSF, EJB, JPA). In this post we will see a project using Spring framework with the following modules: Spring MVC, SpringData e Spring Security. We will see how to do internationalization (i18n) with SpringMVC and templates with Tiles framework.

Postgre will be the database used here, but if you want use it with MySQL just add the MySQL jar to the project and change some configuration. In this post will be displayed both Postgre and MySQL configurations.

It is possible to find the source code of this project in the last page of this post, and to make everybody happy, 3 downloading ways will be available in the end of the post. In this post we will focus in the Spring/JPA code and some of the JPS code highlighting the Angular and Bootstrap libraries, all the JSP code, classes and configurations can be downloaded in the last page.

What we will see in here:

Page 02: Environment Setup
Page 03: Creating the project
Page 04: Understanding the “pom.xml”, “log4j.xml” and the “context.xml” files
Page 05: Creating the Spring and the project XMLs
Page 06: Tiles – Page templates
Page 07: Project Model Classes
Page 08: Using SpringData as Repository (DAO); creating User Service
Page 09: Using SpringData as Repository (DAO); creating Contact Service
Page 10: Creating the Controllers
Page 11: Using Restful approach with SpringMVC
Page 12: Understanding the Login, SpringMVC Interceptor and the Security Rules
Page 13: First Contact with Angular.js and the SpringMVC
Page 14: Using Angular.js bind in a HTML table
Page 15: Internationalization (i18n) with Spring
Page 16: Understanding the Twitter Bootstrap role
Page 17: Running the project

Let us get started!

Response to Complete Web Application: Angular Twitter Bootstrap Spring MVC, Data and Security

1 6 7 8
  1. Jake

    Hi uaihebert. I had created database schemas :”uaiContacts”. and i edit file context.xml?. when i run this app. it has more errors.

    [LOG]

    should i create more table in database? and where is file SQL for table?. Thanks u so much!!!

    • uaihebert Post author

      Hello Jake,

      I did not see any error in the LOG that you posted.

      Could you post only the error block?

      The database will be created automatically. (:

  2. Deep

    Hi uaihebert

    I am able to run your project successfully. But after I log in when clicking on contact tab, I am getting an error on UI (Something happened

    We have an unexpected result, could you report it to the administrator please?)

    Can you please help me to get rid of this. I am not getting anything in the tomcat console. I have contact table in my DB too.

    Regards
    Deep.

    • uaihebert Post author

      Hellp Deep,

      Check to see if your user has the right profile.

      If you are not finding the error, go to the log4j.xml file and change the log level from INFO to DEBUG.

      I hope that helps you, thanks for passing by.

1 6 7 8

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *