官术网_书友最值得收藏!

  • Cloud-Native Applications in Java
  • Ajay Mahajan Munish Kumar Gupta Shyam Sundar
  • 196字
  • 2021-06-24 19:07:13

Setting up internet connectivity

If you are working in an enterprise and have to access internet through a proxy, this can be a pain based on what your enterprise policies limits you to do.

For our development purposes, we need internet connectivity for the following:

  • Downloading dependency libraries such as Log4j and Spring that are configured as part of the Maven repository. This is a one-time activity, as the libraries become part of the local Maven repository once downloaded. If your organization has a repository, you need to configure that.
  • Eclipse plugins from the marketplace as we evolve our sample application.
  • Your program calls a service or APIs that are in the public cloud.

For writing our first service, only the first point is important. Please get your proxy details and configure them in the Maven settings from the main menu, WindowsPreferences, as follows:

Make changes to the settings.xml file in User Settings and add a proxy section:

<proxies> 
<proxy>
<id>myproxy</id>
<active>true</active> <protocol>http</protocol> <host>proxy.yourorg.com</host> <port>8080</port> <username>mahajan</username> <password>****</password> <nonProxyHosts>localhost,127.0.0.1</nonProxyHosts> </proxy> <proxy> <id>myproxy1</id> <active>true</active> <protocol>https</protocol> <host> proxy.yourorg.com</host> <port>8080</port> <username>mahajan</username> <password>****</password> <nonProxyHosts>localhost,127.0.0.1</nonProxyHosts> </proxy>

Save the file and restart Eclipse. We will know whether it worked when we create a project.

主站蜘蛛池模板: 蒲城县| 鸡东县| 内丘县| 肃宁县| 平乐县| 石台县| 沈阳市| 威信县| 孟村| 惠州市| 阿城市| 楚雄市| 康平县| 东阿县| 安顺市| 锡林郭勒盟| 琼结县| 红安县| 英吉沙县| 盘山县| 瑞昌市| 江华| 郎溪县| 沾化县| 阳谷县| 栾川县| 汉源县| 六盘水市| 汉中市| 日喀则市| 泽普县| 盈江县| 鹤峰县| 金门县| 高邑县| 汤原县| 南昌市| 新绛县| 黑水县| 四平市| 理塘县|