01
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
testTpl = (SolrTemplate) wac.getBean("testTpl");
对应
build/classes/applicationContext.xml 的
<bean id="testTpl" class="org.springframework.data.solr.core.SolrTemplate">