parent
c77bc99a05
commit
01d9072787
|
@ -1,6 +1,6 @@
|
||||||
package io.metersphere.controller.remote;
|
package io.metersphere.controller.remote;
|
||||||
|
|
||||||
import io.metersphere.service.remote.SystemSettingService;
|
import io.metersphere.service.remote.BaseSystemSettingService;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -12,17 +12,17 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
public class BasePlatformPluginController {
|
public class BasePlatformPluginController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
SystemSettingService systemSettingService;
|
BaseSystemSettingService baseSystemSettingService;
|
||||||
|
|
||||||
@PostMapping("/**")
|
@PostMapping("/**")
|
||||||
public Object list(HttpServletRequest request, @RequestBody Object param) {
|
public Object list(HttpServletRequest request, @RequestBody Object param) {
|
||||||
String url = request.getRequestURI().replace("/global", "");
|
String url = request.getRequestURI().replace("/global", "");
|
||||||
return systemSettingService.post(url, param);
|
return baseSystemSettingService.post(url, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/**")
|
@GetMapping("/**")
|
||||||
public Object get(HttpServletRequest request) {
|
public Object get(HttpServletRequest request) {
|
||||||
String url = request.getRequestURI().replace("/global", "");
|
String url = request.getRequestURI().replace("/global", "");
|
||||||
return systemSettingService.get(url);
|
return baseSystemSettingService.get(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ import io.metersphere.service.RemoteService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class SystemSettingService extends RemoteService {
|
public class BaseSystemSettingService extends RemoteService {
|
||||||
public SystemSettingService() {
|
public BaseSystemSettingService() {
|
||||||
super(MicroServiceName.SYSTEM_SETTING);
|
super(MicroServiceName.SYSTEM_SETTING);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
package io.metersphere.controller.remote;
|
package io.metersphere.controller.remote;
|
||||||
|
|
||||||
import io.metersphere.remote.service.PlatformPluginService;
|
import io.metersphere.remote.service.PlatformPluginService;
|
||||||
import io.metersphere.service.remote.SystemSettingService;
|
import io.metersphere.service.remote.BaseSystemSettingService;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
@ -14,18 +14,18 @@ import javax.servlet.http.HttpServletResponse;
|
||||||
})
|
})
|
||||||
public class SystemSettingController {
|
public class SystemSettingController {
|
||||||
@Resource
|
@Resource
|
||||||
SystemSettingService systemSettingService;
|
BaseSystemSettingService baseSystemSettingService;
|
||||||
@Resource
|
@Resource
|
||||||
PlatformPluginService platformPluginService;
|
PlatformPluginService platformPluginService;
|
||||||
|
|
||||||
@PostMapping("/**")
|
@PostMapping("/**")
|
||||||
public Object list(HttpServletRequest request, @RequestBody Object param) {
|
public Object list(HttpServletRequest request, @RequestBody Object param) {
|
||||||
return systemSettingService.post(request, param);
|
return baseSystemSettingService.post(request, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/**")
|
@GetMapping("/**")
|
||||||
public Object get(HttpServletRequest request) {
|
public Object get(HttpServletRequest request) {
|
||||||
return systemSettingService.get(request);
|
return baseSystemSettingService.get(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/resource/{pluginId}")
|
@GetMapping("/resource/{pluginId}")
|
||||||
|
|
Loading…
Reference in New Issue