lundi 20 avril 2015

How to set up a context.xml for spring with annotations?

I am using Tomcat to host a webapp and would like to know if I can use Spring annotations to create the equivalent of a context.xml in the conf folder of tomcat. An example context.xml:

<?xml version="1.0" encoding="UTF-8"?> <!-- The contents of this file will be loaded for each web application -->
<Context> <!-- Default set of monitored resources -->
    <ResourceLink name="jdbc/SomeDB" global="jdbc/SomeDB" type="javax.sql.DataSource"/>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>

If this is possible to do with annotations can you show me how it is done preferably with an example?

Aucun commentaire:

Enregistrer un commentaire