Configure hibernate and optimize module structure

Hibernate DB connection configuration:
DB: PostgreSQL, port: 5432
login: postgres
password: password