Spring ORM - Run & Test Hibernate



Now in eclipse, right click on the MainApp.java, select Run As context menu, and select Java Application. Check the console logs in the eclipse. You can see the below logs −

Oct 05, 2025 6:08:40 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate ORM core version 6.6.29.Final
Oct 05, 2025 6:08:41 PM org.hibernate.cache.internal.RegionFactoryInitiator initiateService
INFO: HHH000026: Second-level cache disabled
Oct 05, 2025 6:08:41 PM org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl constructDialect
WARN: HHH90000025: MySQL8Dialect does not need to be specified explicitly using 'hibernate.dialect' (remove the property setting and it will be selected by default)
Oct 05, 2025 6:08:41 PM org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl logSelectedDialect
WARN: HHH90000026: MySQL8Dialect has been deprecated; use org.hibernate.dialect.MySQLDialect instead
Oct 05, 2025 6:08:41 PM org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator logConnectionInfo
INFO: HHH10001005: Database info:
	Database JDBC URL [Connecting through datasource 'org.springframework.jdbc.datasource.DriverManagerDataSource@31ea9581']
	Database driver: undefined/unknown
	Database version: 8.0
	Autocommit mode: undefined/unknown
	Isolation level: undefined/unknown
	Minimum pool size: undefined/unknown
	Maximum pool size: undefined/unknown
Oct 05, 2025 6:08:42 PM org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator initiateService
INFO: HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
Hibernate: drop table if exists Employees
Hibernate: create table Employees (SALARY float(53), id integer not null auto_increment, DESIGNATION varchar(255), NAME varchar(255), primary key (id)) engine=InnoDB
Hibernate: insert into Employees (DESIGNATION,NAME,SALARY) values (?,?,?)
Hibernate: insert into Employees (DESIGNATION,NAME,SALARY) values (?,?,?)
Hibernate: insert into Employees (DESIGNATION,NAME,SALARY) values (?,?,?)
Hibernate: select e1_0.id,e1_0.DESIGNATION,e1_0.NAME,e1_0.SALARY from Employees e1_0
Id : 1
Name : Julie
Salary = 10000.0
Designation = Technical Manager

Id : 2
Name : Robert
Salary = 20000.0
Designation = Senior Manager

Id : 3
Name : Anil
Salary = 5000.0
Designation = Software Engineer

Here project is built and run using spring configurations. A table Employee is created and have three records. You can verify the same using MySQL console.

Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 41
Server version: 8.0.23 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use tutorialspoint;
Database changed
mysql> select * from employees;
+----+-------------------+--------+--------+
| id | DESIGNATION       | NAME   | SALARY |
+----+-------------------+--------+--------+
|  1 | Technical Manager | Julie  |  10000 |
|  2 | Senior Manager    | Robert |  20000 |
|  3 | Software Engineer | Anil   |   5000 |
+----+-------------------+--------+--------+
3 rows in set (0.00 sec)

mysql>
Advertisements