Friday, June 15, 2018

Simple Springboot + hibernate + mysql example

This is a simple spring boot + hibernate (JPA) example.

Below are the tables created in MySQL

create table category
(
catid int not null auto_increment,primary key (catid),
catname  varchar(30) not null
);


create table menu
(
menuid int not null auto_increment, primary key (menuid),
menuname varchar(60) not null,
catid int not null, 
        foreign key (catid) references category(catid)

);


Here is the pom.xml file