improvement: device 更名为 env
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package net.geedge.api.config;
|
||||
|
||||
import net.geedge.api.entity.DeviceApiYml;
|
||||
import net.geedge.api.entity.EnvApiYml;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||||
@@ -12,10 +12,10 @@ import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry
|
||||
public class WebSocketConfig implements WebSocketConfigurer {
|
||||
|
||||
@Autowired
|
||||
private DeviceApiYml deviceApiYml;
|
||||
private EnvApiYml envApiYml;
|
||||
|
||||
@Override
|
||||
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
||||
registry.addHandler(new VncProxyHandler(deviceApiYml.getVnc()), "/api/v1/device/websocket").setAllowedOrigins("*");
|
||||
registry.addHandler(new VncProxyHandler(envApiYml.getVnc()), "/api/v1/env/websocket").setAllowedOrigins("*");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user