小编Cha*_*enu的帖子

Mac OS X sudo docker无法连接到Docker守护程序.docker守护程序是否在此主机上运行?

我安装了docker,似乎有些问题.

$ docker ps
Run Code Online (Sandbox Code Playgroud)

集装箱ID图像命令创建状态端口名称

$sudo docker ps
Run Code Online (Sandbox Code Playgroud)

无法连接到Docker守护程序.docker守护程序是否在此主机上运行?

我该怎么办?

macos docker

12
推荐指数
4
解决办法
2万
查看次数

Google Cloud Api中的用户为空

我按照本教程中的说明操作.

https://developers.google.com/appengine/docs/java/endpoints/getstarted/auth

当我部署我的代码.并去测试我的应用程序.

使用以下网址

http://chandru-compute.appspot.com/_ah/api/explorer

我的helloworld.greetings.multiply和helloworld.greetings.getGreeting按预期工作.

但我对helloworld.greetings.authed方法有疑问.

用户对象始终为null.

这是代码.

package com.google.devrel.samples.helloendpoints;

import com.google.api.server.spi.config.Api;
import com.google.api.server.spi.config.ApiMethod;
import com.google.appengine.api.users.User;
import com.google.appengine.api.users.UserService;
import com.google.appengine.api.users.UserServiceFactory;
import javax.inject.Named;
import java.util.ArrayList;
/**
 * Defines v1 of a helloworld API, which provides simple "greeting" methods.
 */
@Api(
    name = "helloworld",
    version = "v1",
    clientIds = {com.google.api.server.spi.Constant.API_EXPLORER_CLIENT_ID}
)
public class Greetings {
  public static ArrayList<Greeting> greetings = new ArrayList<Greeting>();
  static {
    greetings.add(new Greeting("hello world!"));
    greetings.add(new Greeting("goodbye world!"));
  }

  public Greeting getGreeting(@Named("id") Integer id) {
    return greetings.get(id);
  }

   @ApiMethod(name …
Run Code Online (Sandbox Code Playgroud)

google-app-engine google-cloud-endpoints

7
推荐指数
2
解决办法
1822
查看次数