Quantcast
Channel: Spring beans redefinition in unit test environment - Stack Overflow
Viewing all articles
Browse latest Browse all 14

Answer by duffymo for Spring beans redefinition in unit test environment

$
0
0

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 all articles
Browse latest Browse all 14

Trending Articles