mirror of
https://github.com/wahyd4/Martian.git
synced 2026-08-08 21:06:40 +10:00
去除不常用的依赖
This commit is contained in:
@@ -5,6 +5,7 @@ import com.mars.common.base.config.model.FileUploadConfig;
|
||||
import com.mars.common.base.config.model.JedisConfig;
|
||||
import com.mars.common.base.config.model.ThreadPoolConfig;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -58,7 +59,13 @@ public abstract class MarsConfig {
|
||||
* 连接池配置
|
||||
* @return 连接池配置
|
||||
*/
|
||||
public abstract List<Properties> jdbcProperties();
|
||||
public List<Properties> jdbcProperties(){
|
||||
List<Properties> propertiesList = new ArrayList<Properties>();
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty("name","default");
|
||||
propertiesList.add(properties);
|
||||
return propertiesList;
|
||||
}
|
||||
|
||||
/**
|
||||
* jedis配置
|
||||
|
||||
@@ -2,18 +2,10 @@ package com.mars.common.test.config;
|
||||
|
||||
import com.mars.common.base.config.MarsConfig;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
public class TestMarsConfig extends MarsConfig {
|
||||
|
||||
@Override
|
||||
public int port() {
|
||||
return 8080;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Properties> jdbcProperties() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class MarsAddressUtilTest {
|
||||
public void testGetLocalIp(){
|
||||
try {
|
||||
String ipStr = MarsAddressUtil.getLocalIp();
|
||||
Assert.assertEquals("192.168.0.104",ipStr);
|
||||
Assert.assertEquals("172.20.10.5",ipStr);
|
||||
} catch (Exception e){
|
||||
Assert.fail();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user