一、准备Maven私服Nexus
添加saas.maven
仓库地址:http://192.168.31.109:8081/repository/saas.maven
二、新建SpringBoot项目com.saas.pdf
添加类:PdfUtil.java
package com.saas.pdf;public class PdfUtil {public static void Save(String filePath) {System.out.println("保存成功!");}}
添加类:Main.java
package com.saas.pdf;public class Main {publicstaticvoidmain(String[] args){}}
执行打包:
上传:
二、配置maven私服务地址
修改:C:\Program Files\Java\apache-maven-3.6.3\apache-maven-3.6.3\conf\settings.xml
mirrorIdrepositoryIdHuman Readable Name for this Mirror.http://192.168.31.109:8081/repository/saas.maven
添加项目com.saas.swaggerdemo 引用依赖:
修改pom.xml
com.saaspdf0.0.2 saassaashttp://192.168.31.109:8081/repository/saas.maven