创建数据源和JNDI,使用注解在spring MVC应用程序中进行通信 [英] Creation of Data source and JNDI, communication in spring MVC application using annotation

查看:30
本文介绍了创建数据源和JNDI,使用注解在spring MVC应用程序中进行通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Spring mvc 3.0 创建一个演示应用程序.现在我想使用JNDI"和注释将我的应用程序连接到数据库.我在网上搜索,但是没有找到任何好的例子.

I am creating a demo application using Spring mvc 3.0.Now i wants to connect the my application to the data base using "JNDI" and annotations. I am searching on the web,but not find any good example.

希望有人能给我一个很好的链接,让我可以一步步学习注解驱动的 spring mvc 应用程序,该应用程序在注解和 JNDI 的帮助下与 db 层进行通信.

Hopefully somebody could give me a good link where I could learn step by step for the annotation driven spring mvc application that communicate with the db layer with the help of annotation and JNDI.

推荐答案

你需要的是

<jee:jndi-lookup/>

检查这个链接 http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/xsd-config.html#xsd-config-body-schemas-jee-jndi-lookup 有关使用 JNDI 查找的信息.其余配置与没有 JNDI 的 app 类似.

check this link http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/xsd-config.html#xsd-config-body-schemas-jee-jndi-lookup for info on using JNDI lookup . Remaining configurations are similar to app without JNDI .

检查示例 这里

这篇关于创建数据源和JNDI,使用注解在spring MVC应用程序中进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆