修复工作
This commit is contained in:
@@ -36,6 +36,9 @@ public class InitServer implements CommandLineRunner {
|
||||
// 注入mediasServer.port的值
|
||||
@Value("${mediasServer.port}")
|
||||
private int port;
|
||||
// 注入mediasServer.address的值(默认127.0.0.1,只监听本地)
|
||||
@Value("${mediasServer.address:127.0.0.1}")
|
||||
private String address;
|
||||
// 注入MediaServer对象
|
||||
@Autowired
|
||||
private MediaServer mediaServer;
|
||||
@@ -100,8 +103,8 @@ public class InitServer implements CommandLineRunner {
|
||||
ip, port,
|
||||
ip, httpPort,
|
||||
ip, httpPort);
|
||||
// 启动MediaServer
|
||||
this.mediaServer.start(new InetSocketAddress("0.0.0.0", this.port));
|
||||
// 启动MediaServer(只监听配置的地址,默认127.0.0.1)
|
||||
this.mediaServer.start(new InetSocketAddress(this.address, this.port));
|
||||
}
|
||||
|
||||
// 初始化自动播放
|
||||
|
||||
Reference in New Issue
Block a user