spring mvc 与mybatis 的整合.
加入配置文件:
spring-mybaits.xml
配置数据源监听器:
spring-druid.xml
配置数据源spring-datasource.xml
配置连接属性
修改serviceimpl
controller 代码如下:
启动测试.
http://localhost:8080/prot/test/selectone.do?id=1
页面上输出:
http://localhost:8080/prot/test/save.do?name=userno1
控制台输出: