• Nexus 私服资源的上传下载


    Nexus 私服资源的上传下载

    1. Centos7 安装Nexus 参考 Centos7 安装Nexus

    2. 配置私服: 私服是如何配置的

    3. Nexus 3配置阿里云仓库 Nexus 3配置阿里云仓库

    4. Connect to sonatype-download.global.ssl.fastly.net:443 [sonatype-download.global.ssl.fastly.net/154 解决:
      在这里插入图片描述
      参考: org.apache.http.conn.HttpHostConnectException: Connect to sonatype-download.global.ssl.fastly.net:44

    5. 结合springboot 测试之

    测试私服

    1. maven 配置, 请根据自己的实际情况进行配置
    	 
            test-snapshot
            admin
            admin123
        
        
            test-release
            admin
            admin123
        
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
        
            
            maven-public
            
            *
            
            http://192.168.88.100:8081/repository/maven-public/
        
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    1. 新建 项目:provider
      pom配置:
    
    
        4.0.0
        
            org.springframework.boot
            spring-boot-starter-parent
            2.7.5
             
        
        com.example
        provider
        0.0.1
        provider
        Demo project for Spring Boot
        
            1.8
        
        
            
                org.springframework.boot
                spring-boot-starter-web
            
    
            
                org.springframework.boot
                spring-boot-starter-test
                test
            
    
            
                org.projectlombok
                lombok
                1.18.22
            
    
    
        
    
        
        
            
                
                test-release
                
                http://192.168.88.100:8081/repository/test-release/
            
            
                
                test-snapshot
                
                http://192.168.88.100:8081/repository/test-snapshot/
            
        
    
        
            
                
                    org.apache.maven.plugins
                    maven-compiler-plugin
                    3.8.1
                    
                        1.8
                        1.8
                        UTF-8
                    
                
    
            
        
    
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    package com.example.provider.controller;
    
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;
    
    /**
     * @author qeq
     * @date 2022-10-21 14:21
     */
    @RestController
    @RequestMapping("/testController")
    public class TestController {
    
    
        /**
         *  127.0.0.1:8085/testController/test
         * @author qeq
         * @date 2022/10/21 14:22
         * @return String
         **/
        @RequestMapping("test")
        public String test(){
            String str = "success";
            System.out.println(str);
            return str;
        }
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    package com.example.provider.entry;
    
    import lombok.AllArgsConstructor;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    
    import java.io.Serializable;
    
    /**
     * @author qeq
     * @date 2022-10-21 14:29
     */
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public class Test implements Serializable {
        private Long id;
        private String name;
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20

    配置文件设置端口:application.properties

    server.port=8085
    
    • 1

    测试运行: 127.0.0.1:8086/testController/test
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述

    1. 新建 项目:consumer:
    
    
        4.0.0
        
            org.springframework.boot
            spring-boot-starter-parent
            2.7.5
             
        
        com.example
        consumer
        0.0.1-SNAPSHOT
        consumer
        Demo project for Spring Boot
        
            1.8
        
        
            
                org.springframework.boot
                spring-boot-starter-web
            
    
            
                org.springframework.boot
                spring-boot-starter-test
                test
            
    
            
                org.projectlombok
                lombok
                1.18.22
            
    
            
                com.example
                provider
                0.0.1
            
            
        
    
        
            
                
                    org.springframework.boot
                    spring-boot-maven-plugin
                
            
        
    
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    server.port=8086
    
    • 1
    package com.example.consumer.controller;
    
    import com.example.provider.entry.Test;
    import org.springframework.web.bind.annotation.RequestMapping;
    import org.springframework.web.bind.annotation.RestController;
    
    /**
     * @author qeq
     * @date 2022-10-21 14:21
     */
    @RestController
    @RequestMapping("/testController")
    public class TestController {
    
    
        /**
         *  127.0.0.1:8086/testController/test
         * @author qeq
         * @date 2022/10/21 14:22
         * @return String
         **/
        @RequestMapping("test")
        public String test(){
            String str = "success-consumer";
            System.out.println(str);
    
            Test test = new Test();
            test.setName("测试nexus私服的 deploy和依赖引入");
            System.out.println(test.toString());
            return str;
        }
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33

    测试运行: 127.0.0.1:8086/testController/test
    在这里插入图片描述
    在这里插入图片描述

  • 相关阅读:
    Redis集群高可用架构
    Linux、Unix、WindowsC语言理解查看字节序排序
    C++大学教程(第七版)Chapter14.2函数模板-fig14_01
    软件测试不行了?互联网内卷严重?我看未必吧
    COLLABORATIVE DESIGNER FOR SOLIDWORKS® 新功能
    代理配置及多套环境的解决方案
    SpringBoot SpringBoot 基础篇(第一篇) 第1章 SpringBoot 入门 1.1 SpringBoot 简介
    半导体工厂电源问题的解决方案-智能MCC控制中心和带有接地保护的EOCR电机保护器!
    python:OderedDict函数
    PyTorch计算机视觉入门:测试模型与评估,对单帧图片进行推理
  • 原文地址:https://blog.csdn.net/weixin_41695138/article/details/127446148