File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/main/java/com/beyt/jdq/util Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 1010
1111public class ApplicationContextUtil implements ApplicationContextAware {
1212 private static ApplicationContext applicationContext ;
13- private static IEntityManagerProvider entityManagerProvider ;
14- private static IDeserializer deserializer ;
15-
1613 @ Override
1714 public void setApplicationContext (ApplicationContext applicationContext ) throws BeansException {
1815 ApplicationContextUtil .applicationContext = applicationContext ;
19- ApplicationContextUtil .entityManagerProvider = applicationContext .getBean (IEntityManagerProvider .class );
20- ApplicationContextUtil .deserializer = applicationContext .getBean (IDeserializer .class );
2116 }
2217
2318 public static ApplicationContext getApplicationContext () {
2419 return applicationContext ;
2520 }
2621
2722 public static EntityManager getEntityManager (){
28- return entityManagerProvider .provide ();
23+ return applicationContext . getBean ( IEntityManagerProvider . class ) .provide ();
2924 }
3025
3126 public static IDeserializer getDeserializer () {
32- return deserializer ;
27+ return applicationContext . getBean ( IDeserializer . class ) ;
3328 }
3429}
You can’t perform that action at this time.
0 commit comments