Seata分布式事务Caused by: java.lang.IllegalArgumentException:

博客内容描述了在Spring Boot应用中使用Seata进行分布式事务处理时遇到的BeanCreationException,具体为IllegalArgumentException,错误信息指出applicationId为空,txServiceGroup为my_test_tx_group。错误堆栈跟踪显示问题发生在'globalTransactionScanner' bean的初始化过程中。解决方案是在application.yml配置文件中,确保spring.application.name属性已设置,避免分布式事务相关参数为空。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Seata分布式事务出现错误:

Caused by: java.lang.IllegalArgumentException: 
applicationId: , txServiceGroup: my_test_tx_group

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘globalTransactionScanner’ defined in class path resource [com/alibaba/cloud/seata/GlobalTransactionAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: applicationId: , txServiceGroup: my_test_tx_group
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:228) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:722) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:535) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at com.hc.SeataOrderMainApp2001.main(SeataOrderMainApp2001.java:14) [classes/:na]
Caused by: java.lang.IllegalArgumentException: applicationId: , txServiceGroup: my_test_tx_group
at io.seata.spring.annotation.GlobalTransactionScanner.initClient(GlobalTransactionScanner.java:173) ~[seata-all-0.9.0.jar:0.9.0]
at io.seata.spring.annotation.GlobalTransactionScanner.afterPropertiesSet(GlobalTransactionScanner.java:297) ~[seata-all-0.9.0.jar:0.9.0]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
… 16 common frames omitted

解决方案:application.yml中 spring: application: name: 此处使用分布式事务不能为空

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.} [ERROR]-[2025-03-31 16:41:09.951]-[main]-[org.springframework.boot.SpringApplication]-{Application run failed} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'globalTransactionScanner' defined in class path resource [io/seata/spring/boot/autoconfigure/SeataAutoConfiguration.class]: applicationId: null, txServiceGroup: default_tx_group at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1775) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:265) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:792) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:600) ~[spring-context-6.1.1.jar:6.1.1] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753) [spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455) [spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) [spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342) [spring-boot-3.2.0.jar:3.2.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331) [spring-boot-3.2.0.jar:3.2.0] at com.zttech.course.CourseApplication.main(CourseApplication.java:22) [classes/:?] Caused by: java.lang.IllegalArgumentException: applicationId: null, txServiceGroup: default_tx_group at io.seata.spring.annotation.GlobalTransactionScanner.initClient(GlobalTransactionScanner.java:220) ~[seata-all-1.7.0.jar:1.7.0] at io.seata.spring.annotation.GlobalTransactionScanner.afterPropertiesSet(GlobalTransactionScanner.java:537) ~[seata-all-1.7.0.jar:1.7.0] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1822) ~[spring-beans-6.1.1.jar:6.1.1] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1771) ~[spring-beans-6.1.1.jar:6.1.1] ... 16 more
04-01
G:\jdk\bin\java.exe -Dspring.application.name=ecust-custom-api-li -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:G:\2025.1\IntelliJ IDEA 2025.1\lib\idea_rt.jar=56586" -Dfile.encoding=UTF-8 -classpath C:\Users\Administrator\AppData\Local\Temp\classpath458130718.jar com.ruoyi.customApi.OuchnCustomApiApplication 19:27:39.566 [background-preinit] INFO o.h.v.i.util.Version - [<clinit>,21] - HV000001: Hibernate Validator 6.2.3.Final 19:27:39.825 [main] INFO c.u.j.c.EnableEncryptablePropertiesBeanFactoryPostProcessor - [postProcessBeanFactory,40] - Post-processing PropertySource instances 19:27:39.825 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,76] - Skipping PropertySource configurationProperties [class org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource 19:27:39.827 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource bootstrap [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper 19:27:39.827 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper 19:27:39.827 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableSystemEnvironmentPropertySourceWrapper 19:27:39.828 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper 19:27:39.828 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource cachedrandom [org.springframework.cloud.util.random.CachedRandomPropertySource] to EncryptablePropertySourceWrapper 19:27:39.828 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource springCloudClientHostInfo [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper 19:27:39.828 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource Config resource 'class path resource [bootstrap.yml]' via location 'optional:classpath:/' [org.springframework.boot.env.OriginTrackedMapPropertySource] to EncryptableMapPropertySourceWrapper 19:27:39.854 [main] INFO c.u.j.f.DefaultLazyPropertyFilter - [lambda$new$2,31] - Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter 19:27:39.864 [main] INFO c.u.j.r.DefaultLazyPropertyResolver - [lambda$new$2,35] - Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver 19:27:39.865 [main] INFO c.u.j.d.DefaultLazyPropertyDetector - [lambda$new$2,35] - Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector Spring Boot Version: 2.6.6 Spring Application Name: ecust-custom-api-li _ _ (_) | | _ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___ | '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \ | | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | | |_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_| __/ | __/ | |___/ |___/ 19:27:40.172 [main] INFO c.a.n.c.r.client - [lambda$createClient$0,80] - [RpcClientFactory] create a new rpc client of 10025a0f-383b-4399-95f8-7c31d45f15a5_config-0 19:27:40.196 [main] INFO o.r.Reflections - [scan,232] - Reflections took 15 ms to scan 1 urls, producing 3 keys and 6 values 19:27:40.212 [main] INFO o.r.Reflections - [scan,232] - Reflections took 8 ms to scan 1 urls, producing 4 keys and 9 values 19:27:40.220 [main] INFO o.r.Reflections - [scan,232] - Reflections took 7 ms to scan 1 urls, producing 3 keys and 10 values 19:27:40.230 [main] INFO o.r.Reflections - [scan,232] - Reflections took 8 ms to scan 14 urls, producing 0 keys and 0 values 19:27:40.237 [main] INFO o.r.Reflections - [scan,232] - Reflections took 6 ms to scan 1 urls, producing 1 keys and 5 values 19:27:40.246 [main] INFO o.r.Reflections - [scan,232] - Reflections took 7 ms to scan 1 urls, producing 1 keys and 7 values 19:27:40.258 [main] INFO o.r.Reflections - [scan,232] - Reflections took 10 ms to scan 1 urls, producing 2 keys and 8 values 19:27:40.268 [main] INFO o.r.Reflections - [scan,232] - Reflections took 9 ms to scan 14 urls, producing 0 keys and 0 values 19:27:40.269 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] RpcClient init label, labels = {module=config, Vipserver-Tag=null, source=sdk, Amory-Tag=null, Location-Tag=null, taskId=0, AppName=unknown} 19:27:40.269 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda$382/1412656257 19:27:40.270 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] Register server push request handler:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$$Lambda$383/358019805 19:27:40.270 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] Registry connection listener to current client:com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$1 19:27:40.270 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] RpcClient init, ServerListFactory = com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient$2 19:27:40.276 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] Try to connect to server on start up, server: {serverIp = '124.133.23.84', server main port = 18848} 19:27:40.789 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] Success to connect to server [124.133.23.84:18848] on start up, connectionId = 1751282860784_192.168.1.189_55988 19:27:40.790 [com.alibaba.nacos.client.remote.worker] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] Notify connected event to listeners. 19:27:40.790 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler 19:27:40.791 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,60] - [10025a0f-383b-4399-95f8-7c31d45f15a5_config-0] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$391/193625667 19:27:40.818 [main] ERROR c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,101] - get data from Nacos error,dataId:application-dev.yml com.alibaba.nacos.api.exception.NacosException: http error, code=403,msg=authorization failed!,dataId=application-dev.yml,group=DEFAULT_GROUP,tenant=lichao at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.queryConfig(ClientWorker.java:979) at com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:397) at com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:166) at com.alibaba.nacos.client.config.NacosConfigService.getConfig(NacosConfigService.java:94) at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.loadNacosData(NacosPropertySourceBuilder.java:85) at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.build(NacosPropertySourceBuilder.java:73) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosPropertySource(NacosPropertySourceLocator.java:199) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosDataIfPresent(NacosPropertySourceLocator.java:186) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosConfiguration(NacosPropertySourceLocator.java:158) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadSharedConfiguration(NacosPropertySourceLocator.java:116) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.locate(NacosPropertySourceLocator.java:101) at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:51) at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:47) at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:95) at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:613) at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:381) at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) at com.ruoyi.customApi.OuchnCustomApiApplication.main(OuchnCustomApiApplication.java:33) 19:27:40.823 [main] ERROR c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,101] - get data from Nacos error,dataId:ecust-custom-api com.alibaba.nacos.api.exception.NacosException: http error, code=403,msg=authorization failed!,dataId=ecust-custom-api,group=DEFAULT_GROUP,tenant=lichao at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.queryConfig(ClientWorker.java:979) at com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:397) at com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:166) at com.alibaba.nacos.client.config.NacosConfigService.getConfig(NacosConfigService.java:94) at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.loadNacosData(NacosPropertySourceBuilder.java:85) at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.build(NacosPropertySourceBuilder.java:73) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosPropertySource(NacosPropertySourceLocator.java:199) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosDataIfPresent(NacosPropertySourceLocator.java:186) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadApplicationConfiguration(NacosPropertySourceLocator.java:141) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.locate(NacosPropertySourceLocator.java:103) at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:51) at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:47) at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:95) at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:613) at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:381) at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) at com.ruoyi.customApi.OuchnCustomApiApplication.main(OuchnCustomApiApplication.java:33) 19:27:40.826 [main] ERROR c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,101] - get data from Nacos error,dataId:ecust-custom-api.yml com.alibaba.nacos.api.exception.NacosException: http error, code=403,msg=authorization failed!,dataId=ecust-custom-api.yml,group=DEFAULT_GROUP,tenant=lichao at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.queryConfig(ClientWorker.java:979) at com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:397) at com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:166) at com.alibaba.nacos.client.config.NacosConfigService.getConfig(NacosConfigService.java:94) at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.loadNacosData(NacosPropertySourceBuilder.java:85) at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.build(NacosPropertySourceBuilder.java:73) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosPropertySource(NacosPropertySourceLocator.java:199) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosDataIfPresent(NacosPropertySourceLocator.java:186) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadApplicationConfiguration(NacosPropertySourceLocator.java:144) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.locate(NacosPropertySourceLocator.java:103) at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:51) at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:47) at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:95) at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:613) at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:381) at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) at com.ruoyi.customApi.OuchnCustomApiApplication.main(OuchnCustomApiApplication.java:33) 19:27:40.830 [main] ERROR c.a.c.n.c.NacosPropertySourceBuilder - [loadNacosData,101] - get data from Nacos error,dataId:ecust-custom-api-dev.yml com.alibaba.nacos.api.exception.NacosException: http error, code=403,msg=authorization failed!,dataId=ecust-custom-api-dev.yml,group=DEFAULT_GROUP,tenant=lichao at com.alibaba.nacos.client.config.impl.ClientWorker$ConfigRpcTransportClient.queryConfig(ClientWorker.java:979) at com.alibaba.nacos.client.config.impl.ClientWorker.getServerConfig(ClientWorker.java:397) at com.alibaba.nacos.client.config.NacosConfigService.getConfigInner(NacosConfigService.java:166) at com.alibaba.nacos.client.config.NacosConfigService.getConfig(NacosConfigService.java:94) at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.loadNacosData(NacosPropertySourceBuilder.java:85) at com.alibaba.cloud.nacos.client.NacosPropertySourceBuilder.build(NacosPropertySourceBuilder.java:73) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosPropertySource(NacosPropertySourceLocator.java:199) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadNacosDataIfPresent(NacosPropertySourceLocator.java:186) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.loadApplicationConfiguration(NacosPropertySourceLocator.java:149) at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.locate(NacosPropertySourceLocator.java:103) at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:51) at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:47) at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:95) at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:613) at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:381) at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) at com.ruoyi.customApi.OuchnCustomApiApplication.main(OuchnCustomApiApplication.java:33) 19:27:40.833 [main] INFO c.r.c.OuchnCustomApiApplication - [logStartupProfileInfo,646] - The following 1 profile is active: "dev" 19:27:42.183 [main] INFO c.u.j.c.EnableEncryptablePropertiesBeanFactoryPostProcessor - [postProcessBeanFactory,40] - Post-processing PropertySource instances 19:27:42.183 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource bootstrapProperties-ecust-custom-api-dev.yml,DEFAULT_GROUP [org.springframework.cloud.bootstrap.config.BootstrapPropertySource] to EncryptableEnumerablePropertySourceWrapper 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource bootstrapProperties-ecust-custom-api.yml,DEFAULT_GROUP [org.springframework.cloud.bootstrap.config.BootstrapPropertySource] to EncryptableEnumerablePropertySourceWrapper 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource bootstrapProperties-ecust-custom-api,DEFAULT_GROUP [org.springframework.cloud.bootstrap.config.BootstrapPropertySource] to EncryptableEnumerablePropertySourceWrapper 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource bootstrapProperties-application-dev.yml,DEFAULT_GROUP [org.springframework.cloud.bootstrap.config.BootstrapPropertySource] to EncryptableEnumerablePropertySourceWrapper 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,76] - Skipping PropertySource configurationProperties [class org.springframework.boot.context.properties.source.ConfigurationPropertySourcesPropertySource 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,76] - Skipping PropertySource servletConfigInitParams [class org.springframework.core.env.PropertySource$StubPropertySource 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,76] - Skipping PropertySource servletContextInitParams [class org.springframework.core.env.PropertySource$StubPropertySource 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource systemProperties [org.springframework.core.env.PropertiesPropertySource] to EncryptableMapPropertySourceWrapper 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource systemEnvironment [org.springframework.boot.env.SystemEnvironmentPropertySourceEnvironmentPostProcessor$OriginAwareSystemEnvironmentPropertySource] to EncryptableSystemEnvironmentPropertySourceWrapper 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource random [org.springframework.boot.env.RandomValuePropertySource] to EncryptablePropertySourceWrapper 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource cachedrandom [org.springframework.cloud.util.random.CachedRandomPropertySource] to EncryptablePropertySourceWrapper 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource springCloudClientHostInfo [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper 19:27:42.184 [main] INFO c.u.j.EncryptablePropertySourceConverter - [makeEncryptable,81] - Converting PropertySource springCloudDefaultProperties [org.springframework.core.env.MapPropertySource] to EncryptableMapPropertySourceWrapper 19:27:42.263 [main] INFO i.s.s.b.a.SeataAutoConfiguration - [globalTransactionScanner,65] - Automatically configure Seata 19:27:42.263 [main] INFO c.u.j.f.DefaultLazyPropertyFilter - [lambda$new$2,31] - Property Filter custom Bean not found with name 'encryptablePropertyFilter'. Initializing Default Property Filter 19:27:42.268 [main] INFO c.u.j.r.DefaultLazyPropertyResolver - [lambda$new$2,35] - Property Resolver custom Bean not found with name 'encryptablePropertyResolver'. Initializing Default Property Resolver 19:27:42.268 [main] INFO c.u.j.d.DefaultLazyPropertyDetector - [lambda$new$2,35] - Property Detector custom Bean not found with name 'encryptablePropertyDetector'. Initializing Default Property Detector 19:27:42.299 [main] INFO i.s.c.ConfigurationFactory - [<clinit>,65] - load Configuration:FileConfiguration$$EnhancerByCGLIB$$862af1eb 19:27:42.306 [main] INFO i.s.c.ConfigurationFactory - [buildConfiguration,123] - load Configuration:FileConfiguration$$EnhancerByCGLIB$$862af1eb 19:27:42.337 [main] INFO i.s.s.a.GlobalTransactionScanner - [initClient,164] - Initializing Global Transaction Clients ... 19:27:42.372 [main] INFO i.s.c.r.n.NettyClientBootstrap - [start,147] - NettyClientBootstrap has started 19:27:42.372 [main] INFO i.s.s.a.GlobalTransactionScanner - [initClient,172] - Transaction Manager Client is initialized. applicationId[ecust-custom-api-li] txServiceGroup[ecust-custom-api-li-seata-service-group] 19:27:42.378 [main] INFO i.s.r.d.AsyncWorker - [init,125] - Async Commit Buffer Limit: 10000 19:27:42.378 [main] INFO i.s.r.d.x.ResourceManagerXA - [init,40] - ResourceManagerXA init ... 19:27:42.382 [main] INFO i.s.c.r.n.NettyClientBootstrap - [start,147] - NettyClientBootstrap has started 19:27:42.382 [main] INFO i.s.s.a.GlobalTransactionScanner - [initClient,177] - Resource Manager is initialized. applicationId[ecust-custom-api-li] txServiceGroup[ecust-custom-api-li-seata-service-group] 19:27:42.382 [main] INFO i.s.s.a.GlobalTransactionScanner - [initClient,181] - Global Transaction Clients are initialized. 19:27:42.900 [main] INFO o.a.c.c.AprLifecycleListener - [log,173] - Loaded Apache Tomcat Native library [1.3.1] using APR version [1.7.4]. 19:27:42.900 [main] INFO o.a.c.c.AprLifecycleListener - [log,173] - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true]. 19:27:42.900 [main] INFO o.a.c.c.AprLifecycleListener - [log,173] - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 19:27:42.904 [main] INFO o.a.c.c.AprLifecycleListener - [log,173] - OpenSSL successfully initialized [OpenSSL 3.0.14 4 Jun 2024] 19:27:42.912 [main] INFO o.a.c.h.Http11NioProtocol - [log,173] - Initializing ProtocolHandler ["http-nio-9205"] 19:27:42.913 [main] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat] 19:27:42.913 [main] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/9.0.60] 19:27:42.992 [main] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext 19:27:43.146 [main] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - [refresh,591] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.redis.host' in value "${spring.redis.host}" 19:27:43.149 [main] INFO o.a.c.c.StandardService - [log,173] - Stopping service [Tomcat] 19:27:43.185 [main] ERROR o.s.b.SpringApplication - [reportFailure,830] - Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonConfig': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.redis.host' in value "${spring.redis.host}" at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) at com.ruoyi.customApi.OuchnCustomApiApplication.main(OuchnCustomApiApplication.java:33) Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'spring.redis.host' in value "${spring.redis.host}" at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:180) at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126) at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:239) at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210) at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.lambda$processProperties$0(PropertySourcesPlaceholderConfigurer.java:191) at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:936) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1330) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ... 17 common frames omitted 19:27:43.186 [Thread-4] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,108] - [HttpClientBeanHolder] Start destroying common HttpClient 19:27:43.186 [Thread-11] WARN c.a.n.c.n.NotifyCenter - [shutdown,136] - [NotifyCenter] Start destroying Publisher 19:27:43.186 [Thread-11] WARN c.a.n.c.n.NotifyCenter - [shutdown,153] - [NotifyCenter] Destruction of the end 19:27:43.186 [Thread-4] WARN c.a.n.c.h.HttpClientBeanHolder - [shutdown,114] - [HttpClientBeanHolder] Destruction of the end
最新发布
07-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值