网络上大多是修改配置文件。 直到看到了这个:http://www.yihaomen.com/article/455.html 不可以直接prepareStatement,需要有一个Connection对象来承接。