Creation of Data source and JNDI, communication in spring MVC application using annotation

青春壹個敷衍的年華 提交于 2019-12-11 10:55:48

问题


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.

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.


回答1:


what you need is

<jee:jndi-lookup/>

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 .

Check a sample here



来源:https://stackoverflow.com/questions/8487619/creation-of-data-source-and-jndi-communication-in-spring-mvc-application-using

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!