ssm整合

xiaoxiao2021-02-28  69

根据原创作者的步骤一步步进行,http://blog.csdn.net/jackesy/article/details/43195919

最后完成三大框架整合,期间遇到的问题与解决:

1.@service眼瞎标到接口上去了,最后当然注入不进去

2.整合Mybatis的时候,配置文件我是这么引入的<context:property-placeholder location="classpath:jdbc.properties"/>,结果无法连接数据库。后来换了一种加载配置文件的方法,

<bean id="propertyConfigurer"           class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">           <property name="location" value="classpath:jdbc.properties" />       </bean>

然后就连上了数据库,也不知道是什么原因。

3.数据库的配置文件后面多了一些空格,删掉就好,不然也无法访问。

转载请注明原文地址: https://www.6miu.com/read-44928.html

最新回复(0)