Skip to content

Commit 9ec1318

Browse files
committed
fix: update database configuration in README for consistency
1 parent 5fc1472 commit 9ec1318

File tree

1 file changed

+9
-12
lines changed
  • 09-Spring MVC/Mini Project-Real Time Project-Employee Management System(EMS)

1 file changed

+9
-12
lines changed

09-Spring MVC/Mini Project-Real Time Project-Employee Management System(EMS)/README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -284,22 +284,19 @@ Before starting, ensure you have:
284284
- **File**: `src/main/resources/application.properties`.
285285
- **Code**:
286286
```properties
287+
spring.application.name=EMSProject-SpringMVC
288+
287289
# MySQL Database Configuration
288-
spring.datasource.url=jdbc:mysql://localhost:3306/ems_db?useSSL=false&serverTimezone=UTC
290+
spring.datasource.url=jdbc:mysql://localhost:3306/springmvc
289291
spring.datasource.username=root
290292
spring.datasource.password=your_password
291-
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
293+
```
294+
295+
292296

293-
# JPA/Hibernate Configuration
294-
spring.jpa.hibernate.ddl-auto=update
295-
spring.jpa.show-sql=true
296-
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
297297

298-
# Thymeleaf Configuration (optional, defaults)
299-
spring.thymeleaf.cache=false
300-
```
301298
- **Line-by-Line Breakdown**:
302-
- `spring.datasource.url`: Connects to `ems_db` database on `localhost:3306`.
299+
- `spring.datasource.url`: Connects to `springmvc` database on `localhost:3306`.
303300
- `spring.datasource.username/password`: Your MySQL credentials.
304301
- `spring.jpa.hibernate.ddl-auto=update`: Auto-creates/updates the `employee` table.
305302
- `spring.jpa.show-sql=true`: Logs SQL queries for debugging.
@@ -308,7 +305,7 @@ Before starting, ensure you have:
308305
1. Open MySQL Workbench (or CLI).
309306
2. Create database:
310307
```sql
311-
CREATE DATABASE ems_db;
308+
CREATE DATABASE springmvc;
312309
```
313310
3. Verify: `SHOW DATABASES;`.
314311

@@ -721,7 +718,7 @@ Before starting, ensure you have:
721718
- MySQL: Confirm row deleted with `SELECT * FROM employee;`.
722719
3. **Verify Database**:
723720
- Open MySQL Workbench or CLI.
724-
- Run: `USE ems_db; SELECT * FROM employee;`.
721+
- Run: `USE springmvc; SELECT * FROM employee;`.
725722
- Expected: Reflects all CRUD operations (e.g., new rows, updated emails, deleted rows).
726723
- **Sample Test Scenario**:
727724
- Add "John Doe" (`john@doe.com`).

0 commit comments

Comments
 (0)