Description - A server side rendered application to create, list, update and delete your notes.
- Maven
- Spring Core
- Spring MVC
- Hibernate ORM
- JDBC
- MySQL Database
- Java Server Pages ( JSP )
- JSTL ( JSP Standard Tag Library )
- HTML / CSS / Bootstrap
-
Clone the project
-
Import as a Maven project in your favorite IDE.
-
Create a
note
Table in your MySQL Database
CREATE TABLE `notes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(100) DEFAULT NULL,
`content` varchar(350) DEFAULT NULL,
`created_at` datetime DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
);
-
Create a file
database.properties
undersrc/main/resources/
. -
Fill up the database.properties file
#
# MySQL JDBC Properties - Used by Hibernate to connect to MySQL Database
#
jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/MYSQL_DATABASE_NAME?useSSL=false
jdbc.user=MYSQL_DATABASE_USER
jdbc.password=MYSQL_DATABASE_PASSWORD
#
# Hibernate Properties
#
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=true
hibernate.packagesToScan=com.sayandas.firstproject.entity
Set any other Hibernate properties you want to use here and add them in the
sessionFactory()
method in the AppMvcConfig.java
class
- Run the Application on a Server [ Such as Tomcat ]