Using Spring Mock for JNDI DAO testing

Spring 配置範例:


















Java sample code:

SimpleNamingContextBuilder builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();
builder.bind("java:comp/env/datasource", ctx.getBean("datasource"));

你可能感兴趣的:(tips,Spring,DAO,Java,XML)