IOException parsing XML document from class path resource [config/applicationContext.xml]; nested exception is java.net.ConnectException: Connection timed out: connect
nested exception is java.net.ConnectException
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <!--dataSource属性指定要用到的连接池--> <property name="dataSource" ref="dataSource" /> <!--configLocation属性指定mybatis的核心配置文件--> <property name="configLocation" value="config/applicationContext.xml" /> </bean>中value的文件没有找到,写入配置的spring配置文件就好了
nested exception is java.net.ConnectException
NoSuchBeanDefinitionException: No bean named 'userMaper' is defined
getBean找不到定义id为userMaper的bean
<!--UserMaper他是 映射接口 -->