HTTP 代理背后的 Micronaut CLI [英] Micronaut CLI behind a HTTP proxy

查看:81
本文介绍了HTTP 代理背后的 Micronaut CLI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 Micronaut 和 Gradle 的新手,我能够让它在我的个人笔记本电脑上工作.但我想让 POC 在 HTTP 代理后面工作.

I'm new to Micronaut, and Gradle for that matter, and I was able to get it to work on my personal laptop. But I wanted to get a POC working for work which is behind a HTTP proxy.

我一直在寻找一些关于如何配置 Micronaut 以使其能够在其背后正常工作的示例.有人可以指点我一些文档或示例来说明这是如何完成的吗?

I've been looking for some examples on how to configure Micronaut to be able to work properly behind it. Can anybody point me to some docs or examples to show how this is done?

附言我一直在尝试将一些 Gradle 示例放入 Micronaut 的 init.d 目录中,希望它能够找到它,但我还没有让它工作.

P.S. I've been trying to get some Gradle examples into an init.d directory in Micronaut hoping it would pick it up but I haven't gotten it to work yet.

推荐答案

我做了一个

导出 MN_OPTS="-Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=3128 -Dhttp.proxyUser=test -Dhttp.proxyPassword=test"

export MN_OPTS="-Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=3128 -Dhttp.proxyUser=test -Dhttp.proxyPassword=test"

模拟

导出 GRAILS_OPTS="-Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=3128 -Dhttp.proxyUser=test -Dhttp.proxyPassword=test"

export GRAILS_OPTS="-Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=3128 -Dhttp.proxyUser=test -Dhttp.proxyPassword=test"

http://docs.grails.org/latest/guide/conf.html#proxyConfig

它在 micronaut 中没有记录,但它在 RC1 上对我有用

It's undocumented in micronaut but it worked for me on RC1

祝你好运

更正:这是在来源

https://github.com/micronaut-projects/micronaut-core/blob/master/src/main/docs/guide/cli/proxy.adoc

https://github.com/micronaut-projects/micronaut-core/commit/63e18d8d3

它还没有出现在生成的文档中

It's just not yet in the generated docs

这篇关于HTTP 代理背后的 Micronaut CLI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆