Fix CpsSessionFactory for it to be used in prod code 18/140218/4
authormpriyank <priyank.maheshwari@est.tech>
Thu, 13 Feb 2025 11:16:44 +0000 (11:16 +0000)
committermpriyank <priyank.maheshwari@est.tech>
Mon, 17 Feb 2025 10:18:52 +0000 (10:18 +0000)
commit25e2fab51edd290b0ca36f320fe0a4438667d318
tree0d1e344d94c53f40e734a4d1c85709b6e91c8672
parent544438c3110eebbdd8c8e0eb8fea0d8d1eb02967
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>
cps-ri/src/main/java/org/onap/cps/ri/utils/CpsSessionFactory.java
cps-ri/src/main/resources/hibernate.cfg.xml [deleted file]
integration-test/src/test/resources/hibernate.cfg.xml [deleted file]