启动运行的时候出现错误:
2020-10-20 12:01:21.628 DEBUG 69140 --- [ main] i.n.util.internal.NativeLibraryLoader : netty_tcnative_windows_x86_64 cannot be loaded from java.library.path, now trying export to -Dio.netty.native.workdir: C:UsersyhuAppDataLocalTemp
java.lang.UnsatisfiedLinkError: no netty_tcnative_windows_x86_64 in java.library.path: [C:DkitsJavaOpenJDK11.0.4in, C:windowsSunJavain, C:windowssystem32, C:windows, %JAVA_HOME%in, %MAVEN_HOME%in, %GRADLE_HOME%in, C:Program Files (x86)NetSarangXshell 6\, C:windowssystem32, C:windows, C:windowsSystem32Wbem, C:windowsSystem32WindowsPowerShellv1.0\, C:windowsSystem32OpenSSH\, C:Program Files (x86)WebexWebexApplications, C:Program Files (x86)PlantronicsSpokes3G\, C:Program Files (x86)Enterprise VaultEVClientx64\, C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL, C:Program FilesIntelIntel(R) Management Engine ComponentsDAL, C:Program FilesIntelWiFiin\, C:Program FilesCommon FilesIntelWirelessCommon\, C:Program FilesPuTTY\, C:Program Files (x86)GnuWin32in\, C:Program Files
odejs\, C:Program Files (x86)Yarnin\, C:UsersyhuDkitsprotocin\, C:Program FilesGitcmd, C:Program FilesTortoiseGitin, C:Program FilesTortoiseSVNin, C:Program FilesAmazonAWSCLIV2\, C:Program Files (x86)Microsoft SQL Server150DTSBinn\, C:DkitsJavaOpenJDK11.0.4in, C:UsersyhuDkitsmavenin, C:UsersyhuDkitsscalain, C:Dkitsgradlein, C:UsersyhuAppDataLocalMicrosoftWindowsApps, C:UsersyhuAppDataLocalatomin, C:UsersyhuAppDataLocalProgramsMicrosoft VS Codein, C:UsersyhuAppDataLocalGitHubDesktopin, C:UsersyhuAppDataRoaming
pm, C:UsersyhuAppDataLocalYarnin, C:UsersyhuDkitsprotocin, .]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
错误原因和分析
这个错误的原因是包的冲突。
如果你的配置文件中有下面 2 个包。
这 2 个包是冲突的。
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-spring-boot-starter</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>spring-cloud-azure-appconfiguration-config</artifactId>
<version>1.2.7</version>
</dependency>
所以你需要将 spring-cloud-azure-appconfiguration-config 这个包删除后才可以启动。
https://www.ossez.com/t/spring-azure-applicationinsights-tcnative/595