|
Certainly there is no shortage, because when the web server is started, I run the main function in the java file to get ApplicationContext applicationContext=WebApplicationContextUtils.getRequiredWebApplicationContext(event.getServletContext());
applicationContext.getBean("dataSource");
It is normal, the reason may be said: In the web environment, when the EventInterceptorListener runs the above code, the xml configuration file system has not been initialized.
What do you think? |
|