小编Big*_*mAZ的帖子

VS 2017 Xamarin远程iOS模拟器挂起

我正在Windows 10上运行VS 2017 Enterprise的完全更新版本,并构建了已经存在一段时间的应用程序。Mac是远程的,构建运行正常。当我在关闭远程模拟器的情况下调试/运行应用程序时,Mac上的iOS模拟器会启动并正常运行。如果我选中“将仿真器远程卸载到Windows”并启动调试器,仿真器窗口将在我的PC上打开,但永远不会响应。以下日志看起来很正常,但已挂起:

Checking host configuration for connecting to 'ObjExMac'...
Checking host configuration for connecting to 'ObjExMac'...
Host 'ObjExMac' is configured correctly
Starting connection to 'ObjExMac'...
Starting connection to ObjExMac...
Starting Broker 1.1.6.120 in port 57224...
Starting connection to 'ObjExMac'...
SSH connection to 'ObjExMac' has been established...
Starting registered Agents: Build 4.8.0.760, IDB 4.8.0.760...
Starting Xamarin agent: Build 4.8.0.760...
Starting Xamarin agent: IDB 4.8.0.760...
Starting Agent Build 4.8.0.760...
Starting Agent IDB 4.8.0.760...
Agent Build 4.8.0.760 is running
Xamarin agent: …
Run Code Online (Sandbox Code Playgroud)

xamarin.ios xamarin visual-studio-2017

5
推荐指数
0
解决办法
871
查看次数

我们可以在 Spring REST 中使用单一方法来处理 HTTP POST 和 PUT

我们正在构建新的休息服务。我有一个 PUT 方法,看起来像这样:

   @RestController
   public class RestController...
   .
   .
   @PutMapping("/api/entity1")
    public ResponseEntity<String> entity1Put(@RequestBody Myclass entity,
            @RequestParam(value = "node1", defaultValue = emptyString) String node1,
            @RequestParam(value = "user", defaultValue = emptyString) String user,
            @RequestParam(value = "password", defaultValue = emptyString) String password) {...}
Run Code Online (Sandbox Code Playgroud)

该方法本质上是调用应用程序业务层的代理。我的 POST 方法将具有完全相同的签名、准备代码和返回类型。唯一的区别是业务层调用的方法的名称。为了减少代码并促进 API 一致性,我希望有一个方法可以同时处理 PUT 和 POST 请求。

是否有可能做到这一点?

   @RestController
   public class RestController...
   .
   .
   @PutMapping("/api/entity1")
   @PostMapping("/api/entity1")
    public ResponseEntity<String> entity1PutandPost(@RequestBody Myclass entity,
            @RequestParam(value = "node1", defaultValue = emptyString) String node1,
            @RequestParam(value = "user", defaultValue = emptyString) String user,
            @RequestParam(value …
Run Code Online (Sandbox Code Playgroud)

spring-mvc spring-web

4
推荐指数
1
解决办法
2046
查看次数