Skip to content

Spring Boot + Angular 4 + Spring Data JPA + MySQL CRUD App Example: The Tour of Heroes

Notifications You must be signed in to change notification settings

gaoxinwen/spring-boot-angular4-heroes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-boot-angular4-heroes

Spring Boot + Angular 4 + Spring Data JPA + MySQL CRUD App Example: The Tour of Heroes

Getting Started

Prerequisites

You should install the following software on your own computer.

  • JDK 1.8
  • Maven
  • MySQL
  • Node.js (Node 6.9.0 or higher, together with NPM 3 or higher)
  • Angular CLI

Create a database named "test" in MySQL and import "test.sql" file (script folder) into it. After that, configure username and password in "application.properties" file.

Build and run

Open a command prompt and navigate to the root folder, run the following command

mvn clean install

Then, cd into backend folder and run the spring boot application

cd backend
mvn spring-boot:run

After that, open another command prompt and navigate to the folder frontend\src\main\frontend, run the angular application using angular CLI:

ng serve --o

It will automatically open your browser on http://localhost:4200/ (http://localhost:4200/dashboard/ in this case).

Reference

About Hero

There are two ways to create a Hero object.

I used the latter with flattened promise chains in hero.service.ts file. If you find a simple way or if you have any questions, please email me at [email protected]

About

Spring Boot + Angular 4 + Spring Data JPA + MySQL CRUD App Example: The Tour of Heroes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published