参考:https://blog.csdn.net/moyedamo/article/details/72246718 参考:https://blog.csdn.net/qin904863396/article/details/94395947
WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext(); jdbcTemplate = wac.getBean(JdbcTemplate.class);