jdbcTemplate空.png
jdbcTemplate空.png
jdbcTemplate是不是没有注入???
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; @Service public class JdbcTemplateTest { private JdbcTemplate jdbcTemplate; public void setJdbcTemplate(JdbcTemplate jdbcTemplate) { this.jdbcTemplate = jdbcTemplate; } public void test(){ this.jdbcTemplate.execute("call sp_insert_table('100001')"); } public static void main(String[] args) { JdbcTemplateTest j =new JdbcTemplateTest(); j.test(); } }
如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

评论(7)




发布评论
需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。