Revision 62526
Added by Katerina Iatropoulou over 1 year ago
ContextUtilsTest.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.data.claims.parser; |
2 | 2 |
|
3 | 3 |
import eu.dnetlib.data.claims.utils.ContextUtils; |
4 |
import org.apache.log4j.BasicConfigurator; |
|
4 |
import org.apache.logging.log4j.Level; |
|
5 |
import org.apache.logging.log4j.core.config.Configurator; |
|
6 |
import org.apache.logging.log4j.core.config.DefaultConfiguration; |
|
5 | 7 |
import org.junit.Assert; |
6 | 8 |
import org.junit.Before; |
7 | 9 |
import org.junit.Test; |
8 |
import org.springframework.beans.factory.annotation.Autowired; |
|
9 | 10 |
import org.springframework.context.ApplicationContext; |
10 | 11 |
import org.springframework.context.support.ClassPathXmlApplicationContext; |
11 | 12 |
|
... | ... | |
17 | 18 |
|
18 | 19 |
@Before |
19 | 20 |
public void init() throws Exception { |
20 |
BasicConfigurator.configure(); |
|
21 |
Configurator.initialize(new DefaultConfiguration()); |
|
22 |
Configurator.setRootLevel(Level.INFO); |
|
21 | 23 |
ApplicationContext context = new ClassPathXmlApplicationContext("eu/dnetlib/data/claims/springContext-claims.xml"); |
22 | 24 |
|
23 | 25 |
contextUtils = context.getBean(ContextUtils.class); |
Also available in: Unified diff
log4j2 integrated + uoa-global-parent