This is a Spring @Configuration
annotated class I'm using into my spring boot project:
@Configuration
@ImportResource({
"classpath:cat/gencat/ctti/canigo/arch/web/rs/config/canigo-web-rs.xml",
"classpath:cat/gencat/ctti/canigo/arch/core/i18n/config/canigo-core-i18n.xml"
})
public class WebServicesConfiguration {
As you can see I'm importing third-party declared resources.
Nevertheless, I'm trying to avoid to import them into my tests. Currently, I'm trying to create tests in order to test database communication. I don't need to load those resources.
How could I get it?
Here's my related code snippet:
@RunWith(SpringRunner.class)
@SpringBootTest()
public class ModelTest {
@Autowired
private MongoTemplate mongoTemplate;
So, I want to avoid to load WebServicesConfiguration
configuration class when ModelTest
runs.
Any ideas?