使用mybatis-spring-boot-starter即可。 简单来说就是mybatis看见spring boot这么火,于是搞出来mybatis-spring-boot-starter这个解决方案来与springboot更好的集成
详见
http://.test.demo.dao.CityDao"> <select id="selectCityByState" parameterType="String" resultType="City"> select * from city where state = #{state} </select></mapper>
总结
以上所述是小编给大家介绍的springboot下使用mybatis的方法,希望对大家有所帮助!