Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openXG-WIC-Cnf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alex037yang
openXG-WIC-Cnf
Commits
a9800d93
Commit
a9800d93
authored
Jun 22, 2020
by
wutu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
starter化改造
parent
028a177e
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
76 additions
and
34 deletions
+76
-34
cnf-edge-center/src/main/resources/application.yaml
cnf-edge-center/src/main/resources/application.yaml
+3
-0
cnf-utils/pom.xml
cnf-utils/pom.xml
+14
-2
cnf-utils/src/main/java/top/ninwoo/utils/config/CNFUtilsAutoConfiguration.java
...va/top/ninwoo/utils/config/CNFUtilsAutoConfiguration.java
+3
-1
cnf-utils/src/main/java/top/ninwoo/utils/config/UtilsProperties.java
...rc/main/java/top/ninwoo/utils/config/UtilsProperties.java
+16
-0
cnf-utils/src/main/java/top/ninwoo/utils/util/impl/OvsDockerUtilsImpl.java
...n/java/top/ninwoo/utils/util/impl/OvsDockerUtilsImpl.java
+7
-2
cnf-utils/src/main/java/top/ninwoo/utils/util/impl/OvsUtilsImpl.java
...rc/main/java/top/ninwoo/utils/util/impl/OvsUtilsImpl.java
+15
-12
cnf-utils/src/main/resources/META-INF/spring.factories
cnf-utils/src/main/resources/META-INF/spring.factories
+2
-0
cnf-utils/src/test/java/top/ninwoo/utils/DockerServiceTests.java
...ls/src/test/java/top/ninwoo/utils/DockerServiceTests.java
+2
-2
cnf-utils/src/test/java/top/ninwoo/utils/DockerUtilsTest.java
...utils/src/test/java/top/ninwoo/utils/DockerUtilsTest.java
+2
-2
cnf-utils/src/test/java/top/ninwoo/utils/IptablesServiceTests.java
.../src/test/java/top/ninwoo/utils/IptablesServiceTests.java
+2
-2
cnf-utils/src/test/java/top/ninwoo/utils/IptablesUtilsTests.java
...ls/src/test/java/top/ninwoo/utils/IptablesUtilsTests.java
+2
-2
cnf-utils/src/test/java/top/ninwoo/utils/OVSServiceTests.java
...utils/src/test/java/top/ninwoo/utils/OVSServiceTests.java
+2
-3
cnf-utils/src/test/java/top/ninwoo/utils/OsUtilsTests.java
cnf-utils/src/test/java/top/ninwoo/utils/OsUtilsTests.java
+2
-2
cnf-utils/src/test/java/top/ninwoo/utils/SpringMain.java
cnf-utils/src/test/java/top/ninwoo/utils/SpringMain.java
+2
-2
cnf-utils/src/test/java/top/ninwoo/utils/TcUtilsTests.java
cnf-utils/src/test/java/top/ninwoo/utils/TcUtilsTests.java
+2
-2
No files found.
cnf-edge-center/src/main/resources/application.yaml
View file @
a9800d93
...
...
@@ -32,3 +32,6 @@ bs:
port
:
6653
zookeeper
:
url
:
zk.cnf.org:2181
cnf
:
passwd
:
Vudo3423
cnf-utils/pom.xml
View file @
a9800d93
...
...
@@ -20,9 +20,21 @@
<dependencies>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-context
</artifactId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
...
...
cnf-utils/src/main/java/top/ninwoo/utils/config/
DockerConfig
.java
→
cnf-utils/src/main/java/top/ninwoo/utils/config/
CNFUtilsAutoConfiguration
.java
View file @
a9800d93
...
...
@@ -2,6 +2,7 @@ package top.ninwoo.utils.config;
import
com.spotify.docker.client.DefaultDockerClient
;
import
com.spotify.docker.client.DockerClient
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -10,7 +11,8 @@ import java.net.URI;
@Configuration
@ComponentScan
(
"top.ninwoo.utils"
)
public
class
DockerConfig
{
@EnableConfigurationProperties
(
UtilsProperties
.
class
)
public
class
CNFUtilsAutoConfiguration
{
@Bean
(
destroyMethod
=
"close"
)
public
DockerClient
dockerClient
()
{
return
DefaultDockerClient
.
builder
()
...
...
cnf-utils/src/main/java/top/ninwoo/utils/config/UtilsProperties.java
0 → 100644
View file @
a9800d93
package
top.ninwoo.utils.config
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
@ConfigurationProperties
(
prefix
=
"cnf.utils"
)
public
class
UtilsProperties
{
private
String
passwd
=
"admin"
;
public
String
getPasswd
()
{
return
passwd
;
}
public
void
setPasswd
(
String
passwd
)
{
this
.
passwd
=
passwd
;
}
}
cnf-utils/src/main/java/top/ninwoo/utils/util/impl/OvsDockerUtilsImpl.java
View file @
a9800d93
...
...
@@ -3,6 +3,7 @@ package top.ninwoo.utils.util.impl;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
top.ninwoo.utils.util.LinuxCtlUtils
;
import
top.ninwoo.utils.util.OvsDockerUtils
;
import
top.ninwoo.utils.util.Utils
;
...
...
@@ -15,13 +16,17 @@ import top.ninwoo.utils.util.Utils;
@Utils
public
class
OvsDockerUtilsImpl
implements
OvsDockerUtils
{
private
static
Logger
LOG
=
LoggerFactory
.
getLogger
(
OvsDockerUtilsImpl
.
class
);
@Value
(
"${cnf.passwd}"
)
private
String
passwd
;
@Autowired
LinuxCtlUtils
linuxCtlUtils
;
@Override
public
String
addPort
(
String
bridgeName
,
String
devName
,
String
containerId
,
String
ip
)
{
String
cmd
=
"ovs-docker add-port "
+
bridgeName
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ovs-docker add-port "
+
bridgeName
+
" "
+
devName
+
" "
+
containerId
+
" --ipaddress="
+
ip
;
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(
res
.
contains
(
"Error"
))
{
...
...
@@ -37,7 +42,7 @@ public class OvsDockerUtilsImpl implements OvsDockerUtils {
@Override
public
String
delPort
(
String
bridgeName
,
String
devName
,
String
containerId
)
{
String
cmd
=
"ovs-docker del-port "
+
bridgeName
+
" "
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ovs-docker del-port "
+
bridgeName
+
" "
+
devName
+
" "
+
containerId
;
return
linuxCtlUtils
.
runCmd
(
cmd
);
...
...
cnf-utils/src/main/java/top/ninwoo/utils/util/impl/OvsUtilsImpl.java
View file @
a9800d93
...
...
@@ -3,6 +3,7 @@ package top.ninwoo.utils.util.impl;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
top.ninwoo.utils.entity.BridgePort
;
import
top.ninwoo.utils.entity.Ovs
;
import
top.ninwoo.utils.entity.OvsBridge
;
...
...
@@ -26,11 +27,13 @@ public class OvsUtilsImpl implements OvsUtils {
private
final
AtomicInteger
atomicInteger
=
new
AtomicInteger
(
0
);
@Autowired
LinuxCtlUtils
linuxCtlUtils
;
@Value
(
"${cnf.passwd}"
)
private
String
passwd
;
@Override
public
boolean
isInstall
()
{
// 可能会遇到权限问题
String
s
=
linuxCtlUtils
.
runCmd
(
"ovs-vsctl --version"
);
String
s
=
linuxCtlUtils
.
runCmd
(
"
echo '"
+
passwd
+
"' | sudo -S
ovs-vsctl --version"
);
if
(
s
.
contains
(
"Error"
))
{
return
false
;
}
else
{
...
...
@@ -40,7 +43,7 @@ public class OvsUtilsImpl implements OvsUtils {
@Override
public
Ovs
showDetails
()
{
String
res
=
linuxCtlUtils
.
runCmd
(
"ovs-vsctl show"
);
String
res
=
linuxCtlUtils
.
runCmd
(
"
echo '"
+
passwd
+
"' | sudo -S
ovs-vsctl show"
);
Ovs
ovs
=
parseOvsString
(
res
);
return
ovs
;
...
...
@@ -128,7 +131,7 @@ public class OvsUtilsImpl implements OvsUtils {
@Override
public
void
addBridge
(
String
name
)
{
String
cmd
=
"ovs-vsctl add-br "
+
name
;
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ovs-vsctl add-br "
+
name
;
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(
res
.
contains
(
"Error"
))
{
throw
new
RuntimeException
(
"linux bridge has existed!"
);
...
...
@@ -137,7 +140,7 @@ public class OvsUtilsImpl implements OvsUtils {
@Override
public
void
setBridgeProtocol
(
String
bridgeName
,
String
protocol
)
{
String
cmd
=
"ovs-vsctl set bridge "
+
bridgeName
+
" protocols="
+
protocol
;
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ovs-vsctl set bridge "
+
bridgeName
+
" protocols="
+
protocol
;
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(
res
.
contains
(
"Error"
))
{
throw
new
RuntimeException
(
res
);
...
...
@@ -146,7 +149,7 @@ public class OvsUtilsImpl implements OvsUtils {
@Override
public
void
setController
(
String
bridgeName
,
String
host
,
int
port
)
{
String
cmd
=
"ovs-vsctl set-controller "
+
bridgeName
+
" tcp:"
+
host
+
":"
+
port
;
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ovs-vsctl set-controller "
+
bridgeName
+
" tcp:"
+
host
+
":"
+
port
;
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(
res
.
contains
(
"Error"
))
{
throw
new
RuntimeException
(
res
);
...
...
@@ -155,7 +158,7 @@ public class OvsUtilsImpl implements OvsUtils {
@Override
public
void
delBridge
(
String
name
)
{
String
cmd
=
"ovs-vsctl del-br "
+
name
;
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ovs-vsctl del-br "
+
name
;
LOG
.
info
(
"删除网桥[{}]"
,
name
);
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(
res
.
contains
(
"Error"
))
{
...
...
@@ -171,7 +174,7 @@ public class OvsUtilsImpl implements OvsUtils {
*/
@Override
public
boolean
addBridgePort
(
String
bridgeName
,
String
port
)
{
String
cmd
=
"ovs-vsctl add-port "
+
bridgeName
+
" "
+
port
;
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ovs-vsctl add-port "
+
bridgeName
+
" "
+
port
;
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
LOG
.
info
(
"为Bridge:{} 添加Port:{}"
,
bridgeName
,
port
);
if
(!
""
.
equals
(
res
))
{
...
...
@@ -183,7 +186,7 @@ public class OvsUtilsImpl implements OvsUtils {
@Override
public
boolean
delBridgePort
(
String
bridgeName
,
String
port
)
{
String
cmd
=
"ovs-vsctl del-port "
+
bridgeName
+
" "
+
port
;
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ovs-vsctl del-port "
+
bridgeName
+
" "
+
port
;
LOG
.
info
(
"删除Bridge:{} Port:{}"
,
bridgeName
,
port
);
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(!
""
.
equals
(
res
))
{
...
...
@@ -203,7 +206,7 @@ public class OvsUtilsImpl implements OvsUtils {
public
String
[]
createVethPair
(
String
br1
,
String
br2
)
{
String
veth1
=
br1
+
"_"
+
br2
;
String
veth2
=
br2
+
"_"
+
br1
;
String
cmd
=
"ip link add "
+
veth1
+
" type veth peer name "
+
veth2
;
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ip link add "
+
veth1
+
" type veth peer name "
+
veth2
;
LOG
.
info
(
"创建虚拟网卡对[{},{}]"
,
veth1
,
veth2
);
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(!
""
.
equals
(
res
))
{
...
...
@@ -221,7 +224,7 @@ public class OvsUtilsImpl implements OvsUtils {
public
boolean
delVethPort
(
String
[]
veths
)
{
String
veth1
=
veths
[
0
];
String
veth2
=
veths
[
1
];
String
cmd
=
"ip link del "
+
veth1
+
" type veth peer name "
+
veth2
;
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ip link del "
+
veth1
+
" type veth peer name "
+
veth2
;
LOG
.
info
(
"删除虚拟网卡对[{},{}]"
,
veth1
,
veth2
);
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(!
""
.
equals
(
res
))
{
...
...
@@ -239,7 +242,7 @@ public class OvsUtilsImpl implements OvsUtils {
*/
@Override
public
boolean
enableLinuxPort
(
String
port
)
{
String
cmd
=
"ifconfig "
+
port
+
" up"
;
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ifconfig "
+
port
+
" up"
;
LOG
.
info
(
"启动Linux端口:{}"
,
port
);
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(!
""
.
equals
(
res
))
{
...
...
@@ -275,7 +278,7 @@ public class OvsUtilsImpl implements OvsUtils {
public
boolean
setVxlan
(
String
bridgeName
,
String
remoteIp
)
{
// TODO: bug
int
id
=
atomicInteger
.
getAndIncrement
();
String
cmd
=
"ovs-vsctl add-port "
+
bridgeName
String
cmd
=
"
echo '"
+
passwd
+
"' | sudo -S
ovs-vsctl add-port "
+
bridgeName
+
" vxlan"
+
id
+
" -- set interface vxlan"
+
id
+
" type=vxlan options:remote_ip="
+
remoteIp
;
System
.
out
.
println
(
cmd
);
LOG
.
info
(
"设置VXLAN[bridgeName:{},remoteIP:{},{}]"
,
bridgeName
,
remoteIp
,
cmd
);
...
...
cnf-utils/src/main/resources/META-INF/spring.factories
0 → 100644
View file @
a9800d93
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
top.ninwoo.utils.config.CNFUtilsAutoConfiguration
\ No newline at end of file
cnf-utils/src/test/java/top/ninwoo/utils/DockerServiceTests.java
View file @
a9800d93
...
...
@@ -7,7 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
top.ninwoo.common.entity.DockerContainer
;
import
top.ninwoo.utils.config.
DockerConfig
;
import
top.ninwoo.utils.config.
CNFUtilsAutoConfiguration
;
import
top.ninwoo.utils.service.DockerService
;
import
top.ninwoo.utils.util.LinuxCtlUtils
;
...
...
@@ -15,7 +15,7 @@ import java.util.ArrayList;
import
java.util.List
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
classes
=
DockerConfig
.
class
)
@ContextConfiguration
(
classes
=
CNFUtilsAutoConfiguration
.
class
)
public
class
DockerServiceTests
{
@Autowired
private
LinuxCtlUtils
linuxCtlService
;
...
...
cnf-utils/src/test/java/top/ninwoo/utils/DockerUtilsTest.java
View file @
a9800d93
...
...
@@ -7,7 +7,7 @@ import org.springframework.test.context.ContextConfiguration;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.util.Assert
;
import
top.ninwoo.common.entity.DockerContainer
;
import
top.ninwoo.utils.config.
DockerConfig
;
import
top.ninwoo.utils.config.
CNFUtilsAutoConfiguration
;
import
top.ninwoo.utils.util.DockerUtils
;
/**
...
...
@@ -16,7 +16,7 @@ import top.ninwoo.utils.util.DockerUtils;
* @Date Create in 下午5:54 2019/10/25
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
classes
=
DockerConfig
.
class
)
@ContextConfiguration
(
classes
=
CNFUtilsAutoConfiguration
.
class
)
public
class
DockerUtilsTest
{
@Autowired
DockerUtils
dockerUtils
;
...
...
cnf-utils/src/test/java/top/ninwoo/utils/IptablesServiceTests.java
View file @
a9800d93
...
...
@@ -4,7 +4,7 @@ import org.junit.runner.RunWith;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
top.ninwoo.utils.config.
DockerConfig
;
import
top.ninwoo.utils.config.
CNFUtilsAutoConfiguration
;
import
top.ninwoo.utils.service.IptablesService
;
/**
...
...
@@ -14,7 +14,7 @@ import top.ninwoo.utils.service.IptablesService;
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
classes
=
DockerConfig
.
class
)
@ContextConfiguration
(
classes
=
CNFUtilsAutoConfiguration
.
class
)
public
class
IptablesServiceTests
{
@Autowired
IptablesService
iptablesService
;
...
...
cnf-utils/src/test/java/top/ninwoo/utils/IptablesUtilsTests.java
View file @
a9800d93
...
...
@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
top.ninwoo.common.entity.DockerContainer
;
import
top.ninwoo.utils.config.
DockerConfig
;
import
top.ninwoo.utils.config.
CNFUtilsAutoConfiguration
;
import
top.ninwoo.utils.entity.ChainEntity
;
import
top.ninwoo.utils.entity.ChainType
;
import
top.ninwoo.utils.entity.TableType
;
...
...
@@ -26,7 +26,7 @@ import java.util.Map;
* @Date Create in 上午11:54 2019/10/29
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
classes
=
DockerConfig
.
class
)
@ContextConfiguration
(
classes
=
CNFUtilsAutoConfiguration
.
class
)
public
class
IptablesUtilsTests
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
IptablesUtilsTests
.
class
);
...
...
cnf-utils/src/test/java/top/ninwoo/utils/OVSServiceTests.java
View file @
a9800d93
...
...
@@ -6,11 +6,10 @@ import org.junit.runner.RunWith;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
top.ninwoo.utils.config.
DockerConfig
;
import
top.ninwoo.utils.config.
CNFUtilsAutoConfiguration
;
import
top.ninwoo.utils.entity.BridgePort
;
import
top.ninwoo.utils.entity.Ovs
;
import
top.ninwoo.utils.entity.OvsBridge
;
import
top.ninwoo.utils.service.OVSService
;
import
top.ninwoo.utils.util.OvsUtils
;
...
...
@@ -18,7 +17,7 @@ import java.util.ArrayList;
import
java.util.List
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
classes
=
DockerConfig
.
class
)
@ContextConfiguration
(
classes
=
CNFUtilsAutoConfiguration
.
class
)
public
class
OVSServiceTests
{
@Autowired
private
OvsUtils
ovsService
;
...
...
cnf-utils/src/test/java/top/ninwoo/utils/OsUtilsTests.java
View file @
a9800d93
...
...
@@ -5,7 +5,7 @@ import org.junit.runner.RunWith;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
top.ninwoo.utils.config.
DockerConfig
;
import
top.ninwoo.utils.config.
CNFUtilsAutoConfiguration
;
import
top.ninwoo.utils.util.OSUtils
;
/**
...
...
@@ -14,7 +14,7 @@ import top.ninwoo.utils.util.OSUtils;
* @Date Create in 上午10:45 2019/11/4
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
classes
=
DockerConfig
.
class
)
@ContextConfiguration
(
classes
=
CNFUtilsAutoConfiguration
.
class
)
public
class
OsUtilsTests
{
@Autowired
...
...
cnf-utils/src/test/java/top/ninwoo/utils/SpringMain.java
View file @
a9800d93
package
top.ninwoo.utils
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
import
top.ninwoo.utils.config.
DockerConfig
;
import
top.ninwoo.utils.config.
CNFUtilsAutoConfiguration
;
public
class
SpringMain
{
public
static
void
main
(
String
[]
args
)
{
AnnotationConfigApplicationContext
context
=
new
AnnotationConfigApplicationContext
(
DockerConfig
.
class
);
new
AnnotationConfigApplicationContext
(
CNFUtilsAutoConfiguration
.
class
);
}
}
cnf-utils/src/test/java/top/ninwoo/utils/TcUtilsTests.java
View file @
a9800d93
...
...
@@ -5,7 +5,7 @@ import org.junit.runner.RunWith;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
top.ninwoo.utils.config.
DockerConfig
;
import
top.ninwoo.utils.config.
CNFUtilsAutoConfiguration
;
import
top.ninwoo.utils.util.DockerUtils
;
/**
...
...
@@ -14,7 +14,7 @@ import top.ninwoo.utils.util.DockerUtils;
* @Date Create in 下午4:06 2019/10/30
*/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
classes
=
DockerConfig
.
class
)
@ContextConfiguration
(
classes
=
CNFUtilsAutoConfiguration
.
class
)
public
class
TcUtilsTests
{
@Autowired
DockerUtils
dockerUtils
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment