小编Aki*_*lan的帖子

不调用自定义适配器getview

我有一个带有a 的自定义适配器,ListFragmentgetView()根本没有调用适配器.

这是适配器的样子 -

public class ModuleListItemAdapter extends BaseAdapter {

    List<ModuleItem> list;
    Context context;
    Module mod;

    public ModuleListItemAdapter() {
        super();
        // TODO Auto-generated constructor stub
    }

    public ModuleListItemAdapter(Context context, List<ModuleItem> list, Module mod) {
        super();
        this.list = list;
        this.context = context;
        this.mod = mod;
        // TODO Auto-generated constructor stub
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        LayoutInflater inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        RelativeLayout rl = (RelativeLayout) inflater.inflate(R.layout.moduleitem, null);
        GenerateModuleItemView gmiv …
Run Code Online (Sandbox Code Playgroud)

android android-adapter android-listfragment

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

k8s 反向代理使用自签名证书 nginx 保护上游

k8s 入口控制器不会将证书传递给上游 https 服务。

使用 nginx 我可以实现这样的目标

location /upstream {
    proxy_pass                https://backend.example.com;
    proxy_ssl_certificate     /etc/nginx/client.pem;
    proxy_ssl_certificate_key /etc/nginx/client.key;
}
Run Code Online (Sandbox Code Playgroud)

我在这里错过了什么吗?我当前的配置看起来像这样。我不希望来自客户端的 pass ssl 在此终止。

  apiVersion: networking.k8s.io/v1beta1
  kind: Ingress
  metadata:
  name: backend
  namespace:  default
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: "/$1"
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
    nginx.ingress.kubernetes.io/secure-backends: "true"
    nginx.ingress.kubernetes.io/proxy-ssl-secret: "proxy-ca-secret"
    nginx.ingress.kubernetes.io/proxy-ssl-name: "backend.example.com"
  spec:
    rules:
    - http:
        paths:
        - path: /(api/auth/.*)
          backend:
          serviceName: auth
          servicePort: 8080
Run Code Online (Sandbox Code Playgroud)

日志显示

 SSL_do_handshake() failed (SSL: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate:SSL alert number 42) while SSL handshaking to upstream
Run Code Online (Sandbox Code Playgroud)

我使用 openssl 证书验证了 base64 证书,看起来不错。提前致谢!

reverse-proxy nginx kubernetes nginx-reverse-proxy kubernetes-ingress

6
推荐指数
1
解决办法
3873
查看次数