本文介绍了Spring JDBC-如何为Web服务注入DataSource?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个仅公开Web服务的Web应用程序. Web服务只是用于对数据库进行存储过程调用的简单桥梁.

当前,我计划使用Spring JDBC,但是如果没有在实例化它的主函数,该如何注入数据源?

我的猜测是答案是在某些web.xml配置或applicationContext.xml本身中...

我一直在尝试为此在网上找到一个帖子,但是到目前为止还没有运气.很多好的信息,但不完全是我要拍摄的信息.

谁能发光?

感谢

I have a web application which only exposes web services. The web services are just a simple bridge for making stored procedure calls to the database.

Currently I plan using Spring JDBC, but how do I inject the DataSource if I have no main function where instantiate it?

My guess is the answer is in some web.xml configuration or applicationContext.xml itself...

I been trying to find a post on the web for this, but no luck so far. Lots of good info, but not exactly what I am shooting for.

Can anyone shine?

thanks

推荐答案


这篇关于Spring JDBC-如何为Web服务注入DataSource?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 06:44
查看更多