improvement: device 更名为 env

This commit is contained in:
shizhendong
2024-09-04 14:19:02 +08:00
parent 41ba204ee6
commit c861efd75d
10 changed files with 70 additions and 70 deletions

View File

@@ -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("*");
}
}