Quantcast
Viewing latest article 11
Browse Latest Browse All 14

Answer by duffymo for Spring beans redefinition in unit test environment

You can use the import feature in your test app context to load in the prod beans and override the ones you want. For example, my prod data source is usually acquired via JNDI lookup, but when I test I use a DriverManager data source so I don't have to start the app server to test.


Viewing latest article 11
Browse Latest Browse All 14

Trending Articles