aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ri/src/main/resources/hibernate.cfg.xml
diff options
context:
space:
mode:
authormpriyank <priyank.maheshwari@est.tech>2025-02-13 11:16:44 +0000
committermpriyank <priyank.maheshwari@est.tech>2025-02-17 10:18:52 +0000
commit25e2fab51edd290b0ca36f320fe0a4438667d318 (patch)
tree0d1e344d94c53f40e734a4d1c85709b6e91c8672 /cps-ri/src/main/resources/hibernate.cfg.xml
parent544438c3110eebbdd8c8e0eb8fea0d8d1eb02967 (diff)
Fix CpsSessionFactory for it to be used in prod code
- Injecting SessionFactory bean from the spring container instead of manually creating it. - Removing explicit addition of Annotated class as anyways the classes are Entity classes and added to the metadata. So no need to add it explicitly - also removing the unused hibernate config file Issue-ID: CPS-2629 Change-Id: Ife2ae3828d009893de70d9c755d6a07cef2f8d07 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-ri/src/main/resources/hibernate.cfg.xml')
-rw-r--r--cps-ri/src/main/resources/hibernate.cfg.xml16
1 files changed, 0 insertions, 16 deletions
diff --git a/cps-ri/src/main/resources/hibernate.cfg.xml b/cps-ri/src/main/resources/hibernate.cfg.xml
deleted file mode 100644
index 1b822b9de9..0000000000
--- a/cps-ri/src/main/resources/hibernate.cfg.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
-
-<hibernate-configuration>
- <session-factory>
- <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
- <property name="hibernate.connection.url">jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/cpsdb</property>
- <property name="hibernate.connection.username">${DB_USERNAME}</property>
- <property name="hibernate.connection.password">${DB_PASSWORD}</property>
- <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
- <property name="show_sql">true</property>
- <property name="hibernate.hbm2ddl.auto">update</property>
- </session-factory>
-</hibernate-configuration> \ No newline at end of file