https://www.sonatype.com/download-oss-sonatype
http://www.sonatype.org/downloads/nexus-2.1.2-bundle.tar.g
java环境
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | wget https: //dragonwell.oss-cn-shanghai.aliyuncs.com/8/8.6.5-GA/Alibaba_Dragonwell_8.6.5_GA_Linux_x64.ta r.gz tar -zxvf Alibaba_Dragonwell_8. 6 .5_GA_Linux_x64.tar.gz vim /etc/profile export JAVA_HOME=/root/jdk8u282-b1 export PATH=$PATH:$JAVA_HOME/bin [root @cvm -3i2fmpd28a225 jdk8u282-b1]# java -version openjdk version "1.8.0_282" OpenJDK Runtime Environment (Alibaba Dragonwell 8.6 . 5 ) (build 1.8 .0_282-b1) OpenJDK 64 -Bit Server VM (Alibaba Dragonwell 8.6 . 5 ) (build 25.282 -b1, mixed mode) |
nexus
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 74 75 76 77 78 79 | http: //www.sonatype.org/downloads/nexus-2.1.2-bundle.tar.gz tar -zxvf nexus- 3.29 . 2 - 02 -unix.tar.gz [root @cvm -3i2fmpd28a225 bin]# ./nexus start WARNING: ************************************************************ WARNING: Detected execution as "root" user. This is NOT recommended! WARNING: ************************************************************ Starting nexus 不允许root用户启动服务 [root @cvm -3i2fmpd28a225 bin]# vim nexus.rc run_as_user= "root" [root @cvm -3i2fmpd28a225 bin]# ./nexus start WARNING: ************************************************************ WARNING: Detected execution as "root" user. This is NOT recommended! WARNING: ************************************************************ Starting nexus [root @cvm -3i2fmpd28a225 bin]# ps -ef|grep nexus root 450614 1 49 19 : 15 pts/ 1 00 : 01 : 32 /root/jdk8u282-b1/bin/java -server -Dinstall4j.jvmDir=/root /jdk8u282-b1 -Dexe4j.moduleName=/root/nexus- 3.29 . 2 - 02 /bin/nexus -XX:+UnlockDiagnosticVMOptions -Dinstall4j.launcherId= 245 -Dinstall4j.swt= false -Di4jv= 0 -Di4jv= 0 -Di4jv= 0 -Di4jv= 0 -Di4jv= 0 -Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=../sonatype-work/nexus3/log/jvm.log -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack= true -Dkaraf.home=. -Dkaraf.base=. -Dkaraf.etc=etc/karaf -Djava.util.logging.config.file=etc/karaf/java.util.logging.properties -Dkaraf.data=../sonatype-work/nexus3 -Dkaraf.log=../sonatype-work/nexus3/log -Djava.io.tmpdir=../sonatype-work/nexus3/tmp -Dkaraf.startLocalConsole= false -Djava.endorsed.dirs=lib/endorsed -Di4j.vpt= true -classpath /root/nexus- 3.29 . 2 - 02 /.install4j/i4jruntime.jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/nexus-main.jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/activation- 1.1 . 1 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/jakarta.xml.bind-api- 2.3 . 3 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/jaxb-runtime- 2.3 . 3 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/txw2- 2.3 . 3 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/istack-commons-runtime- 3.0 . 10 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/org.apache.karaf.main- 4.2 . 9 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/osgi.core- 6.0 . 0 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/org.apache.karaf.specs.activator- 4.2 . 9 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/org.apache.karaf.diagnostic.boot- 4.2 . 9 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/org.apache.karaf.jaas.boot- 4.2 . 9 .jar com.install4j.runtime.launcher.UnixLauncher start 9d17dc87 0 0 org.sonatype.nexus.karaf.NexusMainroot 450960 449857 0 19 : 18 pts/ 1 00 : 00 : 00 grep --color=auto nexus [root @cvm -3i2fmpd28a225 bin]# ss -ntlp|grep java LISTEN 0 1 127.0 . 0.1 : 35171 0.0 . 0.0 :* users:(( "java" ,pid= 450614 ,fd= 1 15 )) [root @cvm -3i2fmpd28a225 bin]# ./nexus status WARNING: ************************************************************ WARNING: Detected execution as "root" user. This is NOT recommended! WARNING: ************************************************************ nexus is running. [root @cvm -3i2fmpd28a225 bin]# ./nexus stop WARNING: ************************************************************ WARNING: Detected execution as "root" user. This is NOT recommended! WARNING: ************************************************************ Shutting down nexus [root @cvm -3i2fmpd28a225 bin]# ps -ef|grep nexus root 450614 1 7 19 : 15 ? 00 : 03 : 18 /root/jdk8u282-b1/bin/java -server -Dinstall4j.jvmDir=/root /jdk8u282-b1 -Dexe4j.moduleName=/root/nexus- 3.29 . 2 - 02 /bin/nexus -XX:+UnlockDiagnosticVMOptions -Dinstall4j.launcherId= 245 -Dinstall4j.swt= false -Di4jv= 0 -Di4jv= 0 -Di4jv= 0 -Di4jv= 0 -Di4jv= 0 -Xms2703m -Xmx2703m -XX:MaxDirectMemorySize=2703m -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=../sonatype-work/nexus3/log/jvm.log -XX:-OmitStackTraceInFastThrow -Djava.net.preferIPv4Stack= true -Dkaraf.home=. -Dkaraf.base=. -Dkaraf.etc=etc/karaf -Djava.util.logging.config.file=etc/karaf/java.util.logging.properties -Dkaraf.data=../sonatype-work/nexus3 -Dkaraf.log=../sonatype-work/nexus3/log -Djava.io.tmpdir=../sonatype-work/nexus3/tmp -Dkaraf.startLocalConsole= false -Djava.endorsed.dirs=lib/endorsed -Di4j.vpt= true -classpath /root/nexus- 3.29 . 2 - 02 /.install4j/i4jruntime.jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/nexus-main.jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/activation- 1.1 . 1 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/jakarta.xml.bind-api- 2.3 . 3 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/jaxb-runtime- 2.3 . 3 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/txw2- 2.3 . 3 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/istack-commons-runtime- 3.0 . 10 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/org.apache.karaf.main- 4.2 . 9 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/osgi.core- 6.0 . 0 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/org.apache.karaf.specs.activator- 4.2 . 9 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/org.apache.karaf.diagnostic.boot- 4.2 . 9 .jar:/root/nexus- 3.29 . 2 - 02 /lib/boot/org.apache.karaf.jaas.boot- 4.2 . 9 .jar com.install4j.runtime.launcher.UnixLauncher start 9d17dc87 0 0 org.sonatype.nexus.karaf.NexusMainroot 451996 451506 0 19 : 57 pts/ 1 00 : 00 : 00 grep --color=auto nexus [root @cvm -3i2fmpd28a225 bin]# pkill - 9 java [root @cvm -3i2fmpd28a225 bin]# ps -ef|grep nexus root 452004 451506 0 19 : 57 pts/ 1 00 : 00 : 00 grep --color=auto nexus [root @cvm -3i2fmpd28a225 bin]# ./nexus start WARNING: ************************************************************ WARNING: Detected execution as "root" user. This is NOT recommended! WARNING: ************************************************************ Starting nexus [root @cvm -3i2fmpd28a225 bin]# ./nexus status WARNING: ************************************************************ WARNING: Detected execution as "root" user. This is NOT recommended! WARNING: ************************************************************ nexus is running. |
重新安装nexus
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 | 参考文章:https: //www.cnblogs.com/YingYue/p/6045604.html wget https: //sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.11.2-03-bundle.tar.gz mkdir -p /usr/local/nexus tar -zxvf nexus- 2.11 . 2 - 03 -bundle.tar.gz -C /usr/local/nexus/ cd /usr/local/nexus/ cd nexus- 2.11 . 2 - 03 / cd conf/ vim nexus.properties # Jetty section application-port= 8081 application-host= 0.0 . 0.0 nexus-webapp=${bundleBasedir}/nexus nexus-webapp-context-path=/nexus # Nexus section nexus-work=${bundleBasedir}/../sonatype-work/nexus runtime=${bundleBasedir}/nexus/WEB-INF vim ../bin/nexus # Set this to the root of the Nexus installation NEXUS_HOME= "/usr/local/nexus/nexus-2.11.2-03" # If specified, the Wrapper will be run as the specified user. # IMPORTANT - Make sure that the user has the required privileges to write into the Nexus installation director y. # NOTE - This will set the user which is used to run the Wrapper as well as # the JVM and is not useful in situations where a privileged resource or # port needs to be allocated prior to the user being changed. RUN_AS_USER=root ./nexus start 启动之后需要等待,过一会服务才能启动成功 curl http: //127.0.0.1:8081/nexus ps -ef|grep nexus curl http: //127.0.0.1:8081/nexus |
用户默认:admin , admin123
mavn 使用nexus
https://www.cnblogs.com/knowledgesea/p/11190579.html
关联自己的私有仓库
1.在settings.xml文件中添加镜像文件关联
项目依赖
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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | <?xml version= "1.0" encoding= "UTF-8" ?> <project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion> 4.0 . 0 </modelVersion> <groupId>com.lzj1234</groupId> <artifactId>microservice-provider-user</artifactId> <version> 1.0 -SNAPSHOT</version> <properties> <java.version> 1.8 </java.version> </properties> <dependencies> <!-- https: //mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> <version> 2.4 . 2 </version> </dependency> <!-- https: //mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <version> 2.4 . 2 </version> </dependency> <!-- 引入H2数据库,一种内嵌的数据库,语法类似MySQL --> <!-- https: //mvnrepository.com/artifact/com.h2database/h2 --> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version> 1.4 . 200 </version> <!-- <scope>test</scope>--> </dependency> <!-- https: //mvnrepository.com/artifact/org.projectlombok/lombok --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version> 1.18 . 18 </version> <scope>provided</scope> </dependency> <!-- https: //mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <version> 2.4 . 2 </version> <scope>test</scope> </dependency> <!-- https: //mvnrepository.com/artifact/org.apache.maven.plugins/maven-clean-plugin --> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> <version> 2.5 </version> </dependency> </dependencies> <!-- 引入spring cloud的依赖,不能少,主要用来管理Spring Cloud生态各组件的版本 --> <dependencyManagement> <dependencies> <!-- https: //mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies --> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Hoxton.SR10</version> <type>pom</type> <scope>runtime</scope> </dependency> </dependencies> </dependencyManagement> <!-- <build>--> <!-- <plugins>--> <!-- <!– 添加spring-boot的maven插件,不能少,打jar包时得用 –>--> <!-- <plugin>--> <!-- <groupId>org.springframework.boot</groupId>--> <!-- <artifactId>spring-boot-maven-plugin</artifactId>--> <!-- <version> 2.4 . 2 </version>--> <!-- </plugin>--> <!-- </plugins>--> <!-- </build>--> <build> <plugins> <!-- 添加spring-boot的maven插件,不能少,打jar包时得用 --> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version> 2.4 . 2 </version> </plugin> <plugin> <!-- https: //mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -source 1.5 中不支持 lambda 表达式 maven编译报错 -source 1.5 中不支持 lambda 表达式 --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version> 2.5 . 1 </version> <configuration> <source> 1.8 </source> <target> 1.8 </target> </configuration> </plugin> </plugins> </build> </project> |
setting.xml
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 | <mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云公共仓库</name> <url>https: //maven.aliyun.com/repository/public</url> </mirror> <mirror> <id>aliyunmaven2</id> <mirrorOf>*</mirrorOf> <name>阿里云公共仓库</name> <url>http: //repository.apache.org/content/groups/snapshots/?spm=a2c40.maven_devops2020_goldlog_.0.0.43643054AxL62v/</url> </mirror> <mirror> <id>nexus-snapshots</id> <mirrorOf>*</mirrorOf> <url>http: //103.153.37.51:8081/nexus/content/repositories/apache-snapshots/</url> </mirror> <mirror> <id>nexus-releases</id> <mirrorOf>*</mirrorOf> <url>http: //103.153.37.51:8081/nexus/content/groups/public</url> </mirror> |
测试项目运行
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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | C:\Users\l\javademo\microservice-provider-user>mvn spring-boot:run [INFO] Scanning for projects... [INFO] [INFO] ---------------< com.lzj1234:microservice-provider-user >--------------- [INFO] Building microservice-provider-user 1.0 -SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) > test-compile @ microservice-provider-user >>> [INFO] [INFO] --- maven-resources-plugin: 2.6 :resources ( default -resources) @ microservice-provider-user --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin: 2.5 . 1 :compile ( default -compile) @ microservice-provider-user --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin: 2.6 :testResources ( default -testResources) @ microservice-provider-user --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin: 2.5 . 1 :testCompile ( default -testCompile) @ microservice-provider-user --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] <<< spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) < test-compile @ microservice-provider-user <<< [INFO] [INFO] [INFO] --- spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) @ microservice-provider-user --- [INFO] Attaching agents: [] . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | ' _| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2. 4.2 ) 2021 - 02 - 18 23 : 41 : 43.645 INFO 10524 --- [ main] com.src.App : Starting App using Java 1.8 .0_111 on DESKTOP-SRVQTV7 with PID 10524 (C:\Users\l\j avademo\microservice-provider-user\target\classes started by l in C:\Users\l\javademo\microservice-provider-user) 2021 - 02 - 18 23 : 41 : 43.649 INFO 10524 --- [ main] com.src.App : No active profile set, falling back to default profiles: default 2021 - 02 - 18 23 : 41 : 44.230 INFO 10524 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2021 - 02 - 18 23 : 41 : 44.283 INFO 10524 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 45 ms. Found 1 JPA repository interfa ces. 2021 - 02 - 18 23 : 41 : 45.627 INFO 10524 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8000 (http) 2021 - 02 - 18 23 : 41 : 45.637 INFO 10524 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2021 - 02 - 18 23 : 41 : 45.637 INFO 10524 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/ 9.0 . 41 ] 2021 - 02 - 18 23 : 41 : 45.726 INFO 10524 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2021 - 02 - 18 23 : 41 : 45.727 INFO 10524 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2028 ms 2021 - 02 - 18 23 : 41 : 45.789 WARN 10524 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration' : Unsatisfi ed dependency expressed through constructor parameter 0 ; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defin ed in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari. class ]: Bean instantiation via factory method failed; nested exception is org.sp ringframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.sprin gframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class 2021 - 02 - 18 23 : 41 : 45.792 INFO 10524 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2021 - 02 - 18 23 : 41 : 45.804 INFO 10524 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2021 - 02 - 18 23 : 41 : 45.837 ERROR 10524 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active). [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.977 s [INFO] Finished at: 2021 - 02 -18T23: 41 : 45 + 08 : 00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) on project microservice-provider-user: Application finished with exit code: 1 -> [Help 1 ] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch . [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1 ] http: //cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException C:\Users\l\javademo\microservice-provider-user>mvn spring-boot:run [INFO] Scanning for projects... [INFO] [INFO] ---------------< com.lzj1234:microservice-provider-user >--------------- [INFO] Building microservice-provider-user 1.0 -SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) > test-compile @ microservice-provider-user >>> [INFO] [INFO] --- maven-resources-plugin: 2.6 :resources ( default -resources) @ microservice-provider-user --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin: 2.5 . 1 :compile ( default -compile) @ microservice-provider-user --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin: 2.6 :testResources ( default -testResources) @ microservice-provider-user --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin: 2.5 . 1 :testCompile ( default -testCompile) @ microservice-provider-user --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] <<< spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) < test-compile @ microservice-provider-user <<< [INFO] [INFO] [INFO] --- spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) @ microservice-provider-user --- [INFO] Attaching agents: [] . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | ' _| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2. 4.2 ) 2021 - 02 - 18 23 : 42 : 29.708 INFO 21312 --- [ main] com.src.App : Starting App using Java 1.8 .0_111 on DESKTOP-SRVQTV7 with PID 21312 (C:\Users\l\j avademo\microservice-provider-user\target\classes started by l in C:\Users\l\javademo\microservice-provider-user) 2021 - 02 - 18 23 : 42 : 29.712 INFO 21312 --- [ main] com.src.App : No active profile set, falling back to default profiles: default 2021 - 02 - 18 23 : 42 : 30.674 INFO 21312 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2021 - 02 - 18 23 : 42 : 30.727 INFO 21312 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 44 ms. Found 1 JPA repository interfa ces. 2021 - 02 - 18 23 : 42 : 32.064 INFO 21312 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8000 (http) 2021 - 02 - 18 23 : 42 : 32.074 INFO 21312 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2021 - 02 - 18 23 : 42 : 32.075 INFO 21312 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/ 9.0 . 41 ] 2021 - 02 - 18 23 : 42 : 32.160 INFO 21312 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2021 - 02 - 18 23 : 42 : 32.161 INFO 21312 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2398 ms 2021 - 02 - 18 23 : 42 : 32.224 WARN 21312 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration' : Unsatisfi ed dependency expressed through constructor parameter 0 ; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defin ed in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari. class ]: Bean instantiation via factory method failed; nested exception is org.sp ringframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.sprin gframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class 2021 - 02 - 18 23 : 42 : 32.227 INFO 21312 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2021 - 02 - 18 23 : 42 : 32.239 INFO 21312 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2021 - 02 - 18 23 : 42 : 32.262 ERROR 21312 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active). [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.078 s [INFO] Finished at: 2021 - 02 -18T23: 42 : 32 + 08 : 00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) on project microservice-provider-user: Application finished with exit code: 1 -> [Help 1 ] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch . [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1 ] http: //cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException C:\Users\l\javademo\microservice-provider-user>mvn spring-boot:run [INFO] Scanning for projects... [INFO] [INFO] ---------------< com.lzj1234:microservice-provider-user >--------------- [INFO] Building microservice-provider-user 1.0 -SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] >>> spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) > test-compile @ microservice-provider-user >>> [INFO] [INFO] --- maven-resources-plugin: 2.6 :resources ( default -resources) @ microservice-provider-user --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin: 2.5 . 1 :compile ( default -compile) @ microservice-provider-user --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin: 2.6 :testResources ( default -testResources) @ microservice-provider-user --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin: 2.5 . 1 :testCompile ( default -testCompile) @ microservice-provider-user --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] <<< spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) < test-compile @ microservice-provider-user <<< [INFO] [INFO] [INFO] --- spring-boot-maven-plugin: 2.4 . 2 :run ( default -cli) @ microservice-provider-user --- [INFO] Attaching agents: [] . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | ' _| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2. 4.2 ) 2021 - 02 - 18 23 : 44 : 18.052 INFO 18312 --- [ main] com.src.App : Starting App using Java 1.8 .0_111 on DESKTOP-SRVQTV7 with PID 18312 (C:\Users\l\j avademo\microservice-provider-user\target\classes started by l in C:\Users\l\javademo\microservice-provider-user) 2021 - 02 - 18 23 : 44 : 18.056 INFO 18312 --- [ main] com.src.App : No active profile set, falling back to default profiles: default 2021 - 02 - 18 23 : 44 : 18.639 INFO 18312 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2021 - 02 - 18 23 : 44 : 18.691 INFO 18312 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 43 ms. Found 1 JPA repository interfa ces. 2021 - 02 - 18 23 : 44 : 20.049 INFO 18312 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8000 (http) 2021 - 02 - 18 23 : 44 : 20.060 INFO 18312 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2021 - 02 - 18 23 : 44 : 20.061 INFO 18312 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/ 9.0 . 41 ] 2021 - 02 - 18 23 : 44 : 20.145 INFO 18312 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2021 - 02 - 18 23 : 44 : 20.145 INFO 18312 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2043 ms 2021 - 02 - 18 23 : 44 : 20.282 INFO 18312 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool- 1 - Starting... 2021 - 02 - 18 23 : 44 : 20.383 INFO 18312 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool- 1 - Start completed. 2021 - 02 - 18 23 : 44 : 20.428 INFO 18312 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default ] 2021 - 02 - 18 23 : 44 : 20.472 INFO 18312 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.4 . 27 .Final 2021 - 02 - 18 23 : 44 : 20.593 INFO 18312 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations { 5.1 . 2 .Final} 2021 - 02 - 18 23 : 44 : 20.702 INFO 18312 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect Hibernate: drop table if exists user CASCADE Hibernate: drop sequence if exists hibernate_sequence Hibernate: create sequence hibernate_sequence start with 1 increment by 1 Hibernate: create table user (id bigint not null , age integer, balance decimal( 19 , 2 ), name varchar( 255 ), username varchar( 255 ), primary key (id)) 2021 - 02 - 18 23 : 44 : 21.263 INFO 18312 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jt a.platform.internal.NoJtaPlatform] 2021 - 02 - 18 23 : 44 : 21.271 INFO 18312 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2021 - 02 - 18 23 : 44 : 21.535 WARN 18312 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default . Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2021 - 02 - 18 23 : 44 : 21.644 INFO 18312 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2021 - 02 - 18 23 : 44 : 21.825 INFO 18312 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8000 (http) with context path '' 2021 - 02 - 18 23 : 44 : 21.832 INFO 18312 --- [ main] com.src.App : Started App in 4.236 seconds (JVM running for 4.648 ) Hibernate: select user0_.id as id1_0_0_, user0_.age as age2_0_0_, user0_.balance as balance3_0_0_, user0_.name as name4_0_0_, user0_.username as username5_0_0_ from user user0_ where user0_.id=? 2021 - 02 - 18 23 : 44 : 21.883 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 1 ] as [BIGINT] - [ 1 ] Hibernate: call next value for hibernate_sequence Hibernate: insert into user (age, balance, name, username, id) values (?, ?, ?, ?, ?) 2021 - 02 - 18 23 : 44 : 21.910 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 1 ] as [INTEGER] - [ 20 ] 2021 - 02 - 18 23 : 44 : 21.912 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 2 ] as [NUMERIC] - [ 100 ] 2021 - 02 - 18 23 : 44 : 21.914 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 3 ] as [VARCHAR] - [瀵姳绗乚 2021 - 02 - 18 23 : 44 : 21.917 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 4 ] as [VARCHAR] - [account1] 2021 - 02 - 18 23 : 44 : 21.917 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 5 ] as [BIGINT] - [ 1 ] Hibernate: select user0_.id as id1_0_0_, user0_.age as age2_0_0_, user0_.balance as balance3_0_0_, user0_.name as name4_0_0_, user0_.username as username5_0_0_ from user user0_ where user0_.id=? 2021 - 02 - 18 23 : 44 : 21.922 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 1 ] as [BIGINT] - [ 2 ] Hibernate: call next value for hibernate_sequence Hibernate: insert into user (age, balance, name, username, id) values (?, ?, ?, ?, ?) 2021 - 02 - 18 23 : 44 : 21.923 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 1 ] as [INTEGER] - [ 28 ] 2021 - 02 - 18 23 : 44 : 21.924 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 2 ] as [NUMERIC] - [ 180 ] 2021 - 02 - 18 23 : 44 : 21.924 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 3 ] as [VARCHAR] - [閺夊骸娲揮 2021 - 02 - 18 23 : 44 : 21.924 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 4 ] as [VARCHAR] - [account2] 2021 - 02 - 18 23 : 44 : 21.925 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 5 ] as [BIGINT] - [ 2 ] Hibernate: select user0_.id as id1_0_0_, user0_.age as age2_0_0_, user0_.balance as balance3_0_0_, user0_.name as name4_0_0_, user0_.username as username5_0_0_ from user user0_ where user0_.id=? 2021 - 02 - 18 23 : 44 : 21.927 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 1 ] as [BIGINT] - [ 3 ] Hibernate: call next value for hibernate_sequence Hibernate: insert into user (age, balance, name, username, id) values (?, ?, ?, ?, ?) 2021 - 02 - 18 23 : 44 : 21.929 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 1 ] as [INTEGER] - [ 32 ] 2021 - 02 - 18 23 : 44 : 21.930 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 2 ] as [NUMERIC] - [ 280 ] 2021 - 02 - 18 23 : 44 : 21.931 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 3 ] as [VARCHAR] - [閻滃绨瞉 2021 - 02 - 18 23 : 44 : 21.932 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 4 ] as [VARCHAR] - [account3] 2021 - 02 - 18 23 : 44 : 21.932 TRACE 18312 --- [ main] o.h.type.descriptor.sql.BasicBinder : binding parameter [ 5 ] as [BIGINT] - [ 3 ] |
nexus web配置
http://repository.apache.org/content/groups/snapshots/?spm=a2c40.maven_devops2020_goldlog_.0.0.43643054AxL62v/
菜鸟的自白
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 使用C#创建一个MCP客户端
· ollama系列1:轻松3步本地部署deepseek,普通电脑可用
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 按钮权限的设计及实现