ich folgende Test geschrieben haben:nicht verarbeiten können Standorte und Klassen für die Kontextkonfiguration
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:META-INF/dataContext.xml"},classes = Configiuration.class)
@ActiveProfiles("test")
public class CityDaoImplTest {
....
}
I Konfiguration von XML-Datei verwenden müssen, und von Java-Klasse bur, wenn ich
mvn Test rufe ich folgende seee in Konsole:
Tests in error:
initializationError(***.CityDaoImplTest): Cannot process locations AND classes for context configuration [[email protected] declaringClass = '***.CityDaoImplTest', classes = '{***.Configiuration}', locations = '{classpath:META-INF/dataContext.xml}', inheritLocations = true, initializers = '{}', inheritInitializers = true, name = [null], contextLoaderClass = 'org.springframework.test.context.ContextLoader']; configure one or the other, but not both.
Wie es zu beheben, ohne die Konfiguration neu zu schreiben?
von meinem pom: 4.0.7.RELEASE –
gstackoverflow