Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.86 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.86 KB

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]