Coder Social home page Coder Social logo

rakshitshah94 / angular2-springboot-example Goto Github PK

View Code? Open in Web Editor NEW
54.0 11.0 72.0 30.87 MB

Normal CRUD operation with Angular 2 and spring boot.(Modified with edit and create functionality V1.2) is available at >

Home Page: https://github.com/zouabimourad/angular2-spring

License: GNU General Public License v3.0

TypeScript 53.08% JavaScript 3.60% HTML 23.97% CSS 2.28% Java 17.07%
spring-boot java-spring-mvc crud angular2-springboot

angular2-springboot-example's Introduction

Angular2-springboot

This example shows how to use angular 2 application with java Spring MVC with help of RestController.

Here you can see following things.

Server Side

  • SpringBoot
  • Maven 3+
  • JAVA 8
  • Spring MVC architecture
  • RestController
  • Mysql Database | H2 Database

Frontend side

  • Angular2 Components
  • Pagination
  • Modal
  • CRUD Functionality (Create, Read(view/display), Update, Delete)
  • Single Page Application
  • Routing | Router outlet | Router

How to Setup this project

Backend

  • Maven 3+
  • Java 8

Frontend

  • Clone project, Open cmd or Node js Command prompt
  • npm install -g angular-cli to install angular 2 cli ( globally )
  • npm install to install Node packages

How to Run

Backend

  • mvn clean install to clean if exists files and install packages
  • mvn spring-boot:run to start spring boot

Frontend

  • ng serve

Screenshots of Demo

SpringBoot+Angular2 Application Angular2+SpringBoot+Mysql CRUD Example
Read/View Person Details Detail/View person
delete person Delete person
Edit personEdit person

Guide to Build and Run Project

When you Import this project, You need to fulfill the requirements.

If you have imported project in eclipse, Follow this steps to build project:

  1. Right click on project > Properties > Java Build path
  2. Change your JDK if 1.8 is not set.
  3. You need Maven 3+ configured in your system (or You can download Maven 3+ from here)
  4. Once you setup with all this things, Right click on project > Run as > Maven clean (you can directly do this using mvn clean command in cmd at specific project dir)
  5. Again right click on project, Find Maven > in options, Click on Update project check Update snapshots forcefully option and press ok.
  6. Now you can refresh your project. Run clean and build project.
  7. Main Important step > Right click on project > Run as > Maven Install This step will install required dependency specified in pom.xml file

Now as per your question, QPerson is missing Once you follow above steps it will be generated automatically in ../Project_Dir/target/net/../server/model/QPerson.java

You may have question that how this was generated ? If you observed libraries (Dependencies) in pom.xml ,

<dependency>
	<groupId>com.h2database</groupId>
	<artifactId>h2</artifactId>
	<scope>runtime</scope>
</dependency>

You need to know more about H2 Database. H2 is a relational database management system written in Java. It can be embedded in Java applications or run in the client-server mode.

  • Very fast, open source, JDBC API
  • Embedded and server modes; in-memory databases (Simple meaning => data will not persist on the disk)
  • lightweight Java database
  • It can be embedded in Java applications or run in the client-server mode Whatever things (Objects, String or anything) you want to store in H2 you can. In this example, whatever values you want to store (CRUD operations), it will be retain in H2 Database till you shutdown your tomcat.(or other servers). Hope so you will get idea about this things.

References:

This example is made with help of zouabimourad - SpringBoot and Angular 2 and websystique | UI made in angular 1

How to Contribute

If you like this Example and you want help and keep this project successful then contribute your time to improve the source code and let other know about Angular 2. Because this build for newbies to undestand the flow of CRUD with Angular2-Spring.

If you like this work, Share your some love, That will be appreciated!

Buy Me A Coffee

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.