changed
resoureloader -> classloader
This commit is contained in:
parent
ff7de5f7ee
commit
6ec6e42df3
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|||
import com.loafle.overflow.crawler.config.Config;
|
||||
import com.loafle.overflow.crawler.result.OFResultSet;
|
||||
import com.loafle.overflow.crawler.snmp.SNMPCrawler;
|
||||
import com.sun.xml.internal.ws.api.ResourceLoader;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -33,7 +32,8 @@ public class AppTest {
|
|||
public void testSNMP3() throws Exception {
|
||||
SNMPCrawler c = new SNMPCrawler();
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String p = ResourceLoader.class.getClass().getResource("/config/examplev3.json").getPath();
|
||||
ClassLoader classLoader = getClass().getClassLoader();
|
||||
String p = classLoader.getResource("config/examplev3.json").getFile();
|
||||
Config config = mapper.readValue(new File(p),Config.class);
|
||||
|
||||
Object result = c.getInternal(config);
|
||||
|
@ -51,7 +51,9 @@ public class AppTest {
|
|||
public void testSNMP2c() throws Exception {
|
||||
SNMPCrawler c = new SNMPCrawler();
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String p = ResourceLoader.class.getClass().getResource("/config/examplev2.json").getPath();
|
||||
|
||||
ClassLoader classLoader = getClass().getClassLoader();
|
||||
String p = classLoader.getResource("config/examplev2.json").getFile();
|
||||
Config config = mapper.readValue(new File(p),Config.class);
|
||||
|
||||
Object result = c.getInternal(config);
|
||||
|
|
Loading…
Reference in New Issue
Block a user