Member-only story

Full Stack: Angular and Java Spring Boot Application

Gain Java Knowledge
9 min readNov 11, 2023

--

In this tutorial, we will learn how to develop full stack application using spring boot and Angular. Here we will use Spring boot to implement backend Rest API and Angular will use for Frontend.

we will create basic CRUD application to add employee, get employee, update employee and delete employee and will consume Rest API in our angular application. Angular is a platform and framework for building single-page client applications using HTML and TypeScript. Angular is written in TypeScript. It implements core and optional functionality as a set of TypeScript libraries that you import into your applications.

In Spring Boot Application, we have developed employee CRUD API without any DB connection. Just using In memory storage to store data like List.

EmployeeController.java

package com.example.demo.controller;

import com.example.demo.model.Employee;
import com.example.demo.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class EmployeeController {

@Autowired
private EmployeeService employeeService;

@GetMapping("/employee")
public List<Employee> getEmployees(){
return employeeService.getEmployees();
}

@GetMapping("/employee/{id}")
public Employee getEmployeeById(@PathVariable Long id){
return employeeService.getEmployeeById(id);
}

@PostMapping("/employee")…

--

--

Gain Java Knowledge
Gain Java Knowledge

Written by Gain Java Knowledge

The Java programming language is one of the most popular languages today. Stay up to date with news, certifications, free learning resources and much more.

No responses yet