Posts

Bean loading StackTrace

2020-05-05 07:09:09.714 [main] WARN  main -                                 java.lang.NumberFormatException: null                                         java.lang.Integer.parseInt(Integer.java:542)                                 java.lang.Integer.parseInt(Integer.java:615)                                     com.xyz.abc.db.common.MyProperty.getMaxconn(DbProperty.java:989)                                  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                      ...

JPA | Hibernate | Spring boot and Spring data JPA

Image
Its all about connecting to database and persists the data in to database 1. JDBC way Write SQL statement, manually , iterate over resultSet , cumbersome 2. Spring JDBC, just provides templates but still write queries , mapping of data in to query little easy, using row mapper etc Provider easy query result mapper MyBatis: Its not really ORM, it actually maps query to object, done like Here myBatis will pull "user,desc," etc from todo argument. ------> Above all approaches are based on writing queries <-------------- Problem : Query changing and maintaining was problem. --> Hence JPA ----------------------------------------JPA --------------------------------------------------------------------------- Map classes to table, using EntityManager JPAQL --> complex search,criteria API Entiry = Table                                     ...

Inversion of Control and Dependency inejction

Image
Courtesy : edureka youtube  Inversion of Control : Is it Dependency injection ? Java object creation via XML .