Last active
December 10, 2015 20:39
-
-
Save nhniches/4489899 to your computer and use it in GitHub Desktop.
simple spring context loader test class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SpringLoadTester { | |
// this just is a quick main method to test to see if the spring stuff loads | |
// correctly... | |
public static void main(String[] args) { | |
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext( | |
"classpath:spring-applicationContext.xml"); | |
DataSource ds = (DataSource) ctx.getBean("dataSource"); | |
DefaultSqlSessionFactory ssf = (DefaultSqlSessionFactory) ctx.getBean("sqlSessionFactory"); | |
System.out.println("completed load of application context..."); | |
ClassPathXmlApplicationContext ctx2 = new ClassPathXmlApplicationContext( | |
"classpath:AbstractServiceTests-context.xml"); | |
System.out.println("completed load of application context..."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment