Category: Spring Restful (JSON) + Hibernate with AngularJS

Define Database Schema No ratings yet.

You can download the schema.sql – here, and run it with MySQL client. /* create database */ CREATE DATABASE itblogs DEFAULT CHARACTER SET utf8;   USE itblogs;   CREATE TABLE COMPANY( id BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, background  VARCHAR(255) NOT NULL, PRIMARY KEY (id) );   CREATE TABLE SHOP ( id

Project Folder Structure No ratings yet.

Let’s create some necessary folders: 1.       src/main/java/com/itblogs/config/ 2.       src/main/java/com/itblogs/controller/ 3.       src/main/java/com/itblogs/dao/ 4.       src/main/java/com/itblogs/dao/impl/ 5.       src/main/java/com/itblogs/model/ 6.       src/main/java/com/itblogs/service/ 7.       src/main/java/com/itblogs/service/impl/ 8.       src/main/java/com/itblogs/utils/ 9.       src/main/resources/ 10.   src/main/webapp/WEB-INF/lib/ 11.   src/test/java/     Folder Structure: Folder Details src/main/java/com/itblogs/config/ Store Spring configuration files src/main/java/com/itblogs/controller/ Controller Java classes src/main/java/com/itblogs/service/ Service Manager Interface classes src/main/java/com/itblogs/service/impl/ Service Manager classes implementing the interface src/main/java/com/itblogs/dao/

Update POM.xml with necessary Jar Version No ratings yet.

Under the project, you can find pom.xml file. Right-click this file, and Open With Text Editor:   Adding below dependencies: <project xmlns=”″ xmlns:xsi=””   xsi:schemaLocation=””>   <modelVersion>4.0.0</modelVersion>   <groupId>com.itblog</groupId>   <artifactId>SpringRestfulExample</artifactId>   <packaging>war</packaging>   <version>0.0.1-SNAPSHOT</version>   <name>SpringMVCExample Maven Webapp</name>   <url></url>   <properties>     <spring.version>4.2.0.RELEASE</spring.version>     <hibernate.version>4.3.11.Final</hibernate.version>     <javax.validator.version>1.1.0.Final</javax.validator.version>     <hibernate.validator.version>5.2.2.Final</hibernate.validator.version>     <mysql.connector.version>5.1.31</mysql.connector.version>    

Create Maven Web Project No ratings yet.

Let’s try to create a new Maven Project using Eclipse. Right-click on “Navigator” or “Project Explorer” => select “New” => choose “Maven Project”   Click “Next”   Select “maven-archetype-webapp”:   Click “Next”, and fill in the below values:   Click “Finish”, the project SpringRestfulExample has been created: Please rate this Useful?

Introduction to Spring Restful (JSON) + Hibernate with AngularJS No ratings yet.

Background and Pre-request This blog will show you how to build Spring Restful + Hibernate ORM models with AngularJS web application, the example here will use JSON to communicate between Spring controller and AngularJS web UI. After running through our example, you should be able to master Spring Restful and make HTTP JSON request using