添加awsjavasdk打破了 Spring 启动tomcat加载

mum43rcc  于 2021-07-03  发布在  Java
关注(0)|答案(1)|浏览(410)

我正在尝试将aws-sdk-1.11.913添加到我的springboot2.0.6 pom.xml中-

<dependency>
  <groupId>com.amazonaws</groupId>
  <artifactId>aws-java-sdk</artifactId>
  <version>1.11.913</version>
</dependency>

控制台输出-

2020-12-07 17:14:33.936  INFO 3016 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2020-12-07 17:14:34.890  INFO 3016 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-12-07 17:14:34.890  INFO 3016 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.34
2020-12-07 17:14:34.893  INFO 3016 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\JAVA_@\jdk1.8.0_151\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/JAVA_@/clean/jdk-11.0.6+10/bin/client;C:/Program Files/JAVA_@/clean/jdk-11.0.6+10/bin;C:\WINDOWS\System32;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\apache-maven-3.6.0\bin;C:\WINDOWS\system32;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\7-Zip;C:\helm\windows-amd64;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\mingw64\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Salesforce CLI\bin;C:\Users\oqwvm5\AppData\Local\GitHubDesktop\bin;C:\Users\oqwvm5\AppData\Roaming\npm;C:\Users\oqwvm5\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\oqwvm5\AppData\Local\Microsoft\WindowsApps;C:\apache-ant-1.10.5-bin\apache-ant-1.10.5\bin;C:\Program Files\Minikube;C:\Users\oqwvm5\AppData\Local\Programs\Fiddler;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2.2\bin;C:\Program Files (x86)\Nmap;C:\Program Files\Kubernetes\Minikube;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Redis\;C:\Gradle\gradle-6.7.1\bin;C:\Program Files (x86)\Common Files\Pulse Secure\VC142.CRT\X64\;C:\Program Files (x86)\Common Files\Pulse Secure\VC142.CRT\X86\;C:\Program Files (x86)\Pulse Secure\VC142.CRT\X64\;C:\Program Files (x86)\Pulse Secure\VC142.CRT\X86\;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JAVA_@\clean\jdk-11.0.6+10\bin;C:\Windows\System32\sapjco3.dll;C:\Users\oqwvm5\.gradle\caches\modules-2\files-2.1\com.siemens.plm.it\sapjco3\3.1.2\c83fa6472f0c45339bcb1d4fc6e9a2687e2046fc\sapjco3.jar;C:\sapsnc;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\apache-maven-3.6.0\bin;C:\WINDOWS\system32;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\7-Zip;C:\helm\windows-amd64;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\mingw64\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Salesforce CLI\bin;C:\Users\oqwvm5\AppData\Local\GitHubDesktop\bin;C:\Users\oqwvm5\AppData\Roaming\npm;C:\Users\oqwvm5\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\oqwvm5\AppData\Local\Microsoft\WindowsApps;C:\apache-ant-1.10.5-bin\apache-ant-1.10.5\bin;C:\Program Files\Minikube;C:\Users\oqwvm5\AppData\Local\Programs\Fiddler;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.2.2\bin;C:\Program Files (x86)\Nmap;C:\Program Files\Kubernetes\Minikube;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\Redis\;C:\Gradle\gradle-6.7.1\bin;C:\Program Files (x86)\Common Files\Pulse Secure\VC142.CRT\X64\;C:\Program Files (x86)\Common Files\Pulse Secure\VC142.CRT\X86\;C:\Program Files (x86)\Pulse Secure\VC142.CRT\X64\;C:\Program Files (x86)\Pulse Secure\VC142.CRT\X86\;C:\WINDOWS\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JAVA_@\clean\jdk-11.0.6+10\bin;C:\Windows\System32\sapjco3.dll;C:\Users\oqwvm5\.gradle\caches\modules-2\files-2.1\com.siemens.plm.it\sapjco3\3.1.2\c83fa6472f0c45339bcb1d4fc6e9a2687e2046fc\sapjco3.jar;C:\sapsnc;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Program Files\apache-maven-3.6.0\bin;C:\WINDOWS\system32;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\7-Zip;C:\helm\windows-amd64;C:\WINDOWS;C:\WINDOWS\S;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\oqwvm5\AppData\Local\GitHubDesktop\bin;C:\Users\oqwvm5\AppData\Local\Programs\Fiddler;%IntelliJ IDEA Community Edition%;C:\Users\oqwvm5\AppData\Roaming\npm;C:\Program Files (x86)\Nmap;C:\Users\oqwvm5\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Salesforce CLI\bin;C:\Users\oqwvm5\AppData\Local\Programs\Microsoft VS Code\bin;;C:\WINDOWS\system32;;.]
2020-12-07 17:14:35.210  INFO 3016 --- [ost-startStop-1] .[.[/storeservices/api/ordersmanagement] : Initializing Spring embedded WebApplicationContext
2020-12-07 17:14:38.170  INFO 3016 --- [on(1)-127.0.0.1] .[.[/storeservices/api/ordersmanagement] : Initializing Spring FrameworkServlet 'dispatcherServlet'

加载“冻结”,移除此依赖关系并成功加载项目。 Spring 版-

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.6.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

java -

<properties>
    <java.version>1.8</java.version>
</properties>

我应该使用不同的sdk版本吗?

nszi6y05

nszi6y051#

我只需要添加所需的依赖项就可以解决这个问题-

<dependency>
    <groupId>com.amazonaws</groupId>
    <artifactId>aws-java-sdk-sns</artifactId>
    <version>1.11.913</version>
</dependency>

相关问题