-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the PassengerApp_Angular_SpringBoot_MySQL wiki!
Spring Boot Application is provide here:
https://github.com/pkmsoftpro/PassengerApp_Angular_SpringBoot_MySQL/tree/springboot_crud_mysql
Project showcasing my CRUD (Create, Read, Update, Delete) implementation on Angular's Mat-Table. Most importantly frontend updates accordingly with operations. This is important if you're using data from backend (some DB like MySQL). It can be used for local generated data as well.
Project uses Angular version 8 including Angular Material 8.
Angular app using SpringBoot Application does backend updates to MySQL DB. You can find entire HttpClient REST code from this project inside dataService.
# PassengerApp_Angular_SpringBoot_MySQL
Angular FullStack Application, Spring Boot, MySql
Used Spring Boot and JPA.
Add the following bean to allow GET,PUT,POST,DELETE through CORS(Cross Origin Resource Sharing).
@Bean
public WebMvcConfigurer corsConfigurer() {
return new WebMvcConfigurerAdapter() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/userendpoint/**")
.allowedOrigins("*")
.allowedMethods("GET", "POST", "PUT", "DELETE");
}
};
}
1. create database test1;
2. use test1;
3. create table passengers(
Passengerid int,
Pclass int,
Name varchar(100),
Sex varchar(10),
Age double(5,2),
Sibsp int,
Parch int,
Ticket varchar(20),
Fare double(10,2),
Cabin varchar(20),
Embarked varchar(1)
);