From 2be8fde4a8745eb7294aecaba772abc59b32e989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E8=8B=B1=E6=9D=B0?= <327782001@qq.com> Date: Wed, 9 Aug 2023 15:16:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=8F=92=E5=85=A5=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logs/SpringBoot-kwan.log | 325 ++++++++++++++++++ .../controller/PicInfoController.java | 15 +- .../service/PicInfoService.java | 1 + .../service/impl/PicInfoServiceImpl.java | 43 +++ 4 files changed, 383 insertions(+), 1 deletion(-) diff --git a/logs/SpringBoot-kwan.log b/logs/SpringBoot-kwan.log index f33990e..941d4eb 100644 --- a/logs/SpringBoot-kwan.log +++ b/logs/SpringBoot-kwan.log @@ -151,3 +151,328 @@ 2023-08-09 12:58:21 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct 2023-08-09 12:58:31 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct 2023-08-09 12:58:31 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:07:04 [restartedMain] INFO c.k.s.SpringBootKwanApplication - Starting SpringBootKwanApplication using Java 1.8.0_321 on qinyingjiedeMacBook-Pro.local with PID 42336 (/Users/qinyingjie/Documents/idea-workspace/SpringBoot-kwan/target/classes started by qinyingjie in /Users/qinyingjie/Documents/idea-workspace/SpringBoot-kwan) +2023-08-09 15:07:04 [restartedMain] INFO c.k.s.SpringBootKwanApplication - No active profile set, falling back to 1 default profile: "default" +2023-08-09 15:07:04 [background-preinit] INFO o.h.validator.internal.util.Version - HV000001: Hibernate Validator 6.2.3.Final +2023-08-09 15:07:04 [restartedMain] INFO o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable +2023-08-09 15:07:04 [restartedMain] INFO o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' +2023-08-09 15:07:06 [restartedMain] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2023-08-09 15:07:06 [restartedMain] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode. +2023-08-09 15:07:06 [restartedMain] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 26 ms. Found 0 Redis repository interfaces. +2023-08-09 15:07:06 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'io.seata.spring.boot.autoconfigure.SeataAutoConfiguration$SeataDataSourceConfiguration' of type [io.seata.spring.boot.autoconfigure.SeataAutoConfiguration$SeataDataSourceConfiguration$$EnhancerBySpringCGLIB$$fc434eca] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:06 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.cloud.alibaba.seata-io.seata.spring.boot.autoconfigure.properties.SpringCloudAlibabaConfiguration' of type [io.seata.spring.boot.autoconfigure.properties.SpringCloudAlibabaConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:06 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'seata-io.seata.spring.boot.autoconfigure.properties.SeataProperties' of type [io.seata.spring.boot.autoconfigure.properties.SeataProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'io.seata.spring.boot.autoconfigure.SeataAutoConfiguration' of type [io.seata.spring.boot.autoconfigure.SeataAutoConfiguration$$EnhancerBySpringCGLIB$$6892eff] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'springApplicationContextProvider' of type [io.seata.spring.boot.autoconfigure.provider.SpringApplicationContextProvider] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'failureHandler' of type [io.seata.tm.api.DefaultFailureHandlerImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO i.s.s.b.a.SeataAutoConfiguration - Automatically configure Seata +2023-08-09 15:07:07 [restartedMain] INFO io.seata.config.FileConfiguration - The file name of the operation is registry +2023-08-09 15:07:07 [restartedMain] INFO io.seata.config.ConfigurationFactory - load Configuration:FileConfiguration$$EnhancerByCGLIB$$862af1eb +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'configProperties' of type [io.seata.spring.boot.autoconfigure.properties.config.ConfigProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'configFileProperties' of type [io.seata.spring.boot.autoconfigure.properties.config.ConfigFileProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO io.seata.config.FileConfiguration - The file name of the operation is file.conf +2023-08-09 15:07:07 [restartedMain] INFO io.seata.config.ConfigurationFactory - load Configuration:FileConfiguration$$EnhancerByCGLIB$$862af1eb +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'serviceProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.ServiceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Initializing Global Transaction Clients ... +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'threadFactoryProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.ThreadFactoryProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'transportProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.TransportProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO i.s.c.rpc.netty.NettyClientBootstrap - NettyClientBootstrap has started +2023-08-09 15:07:07 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Transaction Manager Client is initialized. applicationId[spring-boot-name] txServiceGroup[default_tx_group] +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'rmProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.RmProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO io.seata.rm.datasource.AsyncWorker - Async Commit Buffer Limit: 10000 +2023-08-09 15:07:07 [restartedMain] INFO i.s.r.d.xa.ResourceManagerXA - ResourceManagerXA init ... +2023-08-09 15:07:07 [restartedMain] INFO i.s.c.rpc.netty.NettyClientBootstrap - NettyClientBootstrap has started +2023-08-09 15:07:07 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Resource Manager is initialized. applicationId[spring-boot-name] txServiceGroup[default_tx_group] +2023-08-09 15:07:07 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Global Transaction Clients are initialized. +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.datasource.dynamic-com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$a65da174] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:07 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'dsProcessor' of type [com.baomidou.dynamic.datasource.processor.DsHeaderProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:07:08 [restartedMain] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8888 (http) +2023-08-09 15:07:08 [restartedMain] INFO o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8888"] +2023-08-09 15:07:08 [restartedMain] INFO o.a.catalina.core.StandardService - Starting service [Tomcat] +2023-08-09 15:07:08 [restartedMain] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.60] +2023-08-09 15:07:08 [restartedMain] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2023-08-09 15:07:08 [restartedMain] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 3422 ms +2023-08-09 15:07:09 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource detect ALIBABA SEATA and enabled it +2023-08-09 15:07:09 [restartedMain] INFO c.alibaba.druid.pool.DruidDataSource - {dataSource-1,kwan-ds} inited +2023-08-09 15:07:09 [restartedMain] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:07:09 [restartedMain] INFO c.alibaba.druid.pool.DruidDataSource - {dataSource-2,ali-ds} inited +2023-08-09 15:07:09 [restartedMain] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:07:09 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource - add a datasource named [kwan-ds] success +2023-08-09 15:07:09 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource - add a datasource named [ali-ds] success +2023-08-09 15:07:09 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource initial loaded [2] datasource,primary datasource named [kwan-ds] +2023-08-09 15:07:09 [restartedMain] INFO i.s.s.a.d.SeataAutoDataSourceProxyCreator - Auto proxy of [dataSource] +2023-08-09 15:07:09 [restartedMain] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:07:10 [restartedMain] INFO c.k.s.config.RedisConfig - ==================自定义的redisTemplate实例化了=================== +2023-08-09 15:07:10 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Bean[com.kwan.springbootkwan.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$7a2cc615] with name [userServiceImpl] would use interceptor [io.seata.spring.annotation.GlobalTransactionalInterceptor] +2023-08-09 15:07:12 [restartedMain] INFO o.s.b.d.a.OptionalLiveReloadServer - LiveReload server is running on port 35729 +2023-08-09 15:07:13 [restartedMain] INFO o.s.b.c.r.s.JobRepositoryFactoryBean - No database type set, using meta data indicating: MYSQL +2023-08-09 15:07:13 [restartedMain] INFO o.s.b.c.l.support.SimpleJobLauncher - No TaskExecutor has been set, defaulting to synchronous executor. +2023-08-09 15:07:13 [restartedMain] INFO o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8888"] +2023-08-09 15:07:13 [restartedMain] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8888 (http) with context path '' +2023-08-09 15:07:13 [restartedMain] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - Context refreshed +2023-08-09 15:07:13 [restartedMain] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2023-08-09 15:07:13 [restartedMain] INFO s.d.s.w.s.ApiListingReferenceScanner - Scanning for api listing references +2023-08-09 15:07:13 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_1 +2023-08-09 15:07:13 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectOneUsingGET_1 +2023-08-09 15:07:13 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: deleteUsingDELETE_1 +2023-08-09 15:07:13 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: insertUsingPOST_1 +2023-08-09 15:07:13 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_2 +2023-08-09 15:07:14 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_3 +2023-08-09 15:07:14 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectOneUsingGET_2 +2023-08-09 15:07:14 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: updateUsingPUT_1 +2023-08-09 15:07:14 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: deleteUsingDELETE_2 +2023-08-09 15:07:14 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: insertUsingPOST_2 +2023-08-09 15:07:14 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_4 +2023-08-09 15:07:14 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectOneUsingGET_3 +2023-08-09 15:07:14 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: updateUsingPUT_2 +2023-08-09 15:07:14 [restartedMain] INFO c.k.s.SpringBootKwanApplication - Started SpringBootKwanApplication in 9.836 seconds (JVM running for 12.573) +2023-08-09 15:07:26 [http-nio-8888-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2023-08-09 15:07:26 [http-nio-8888-exec-1] INFO o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2023-08-09 15:07:26 [http-nio-8888-exec-1] INFO o.s.web.servlet.DispatcherServlet - Completed initialization in 8 ms +2023-08-09 15:07:26 [http-nio-8888-exec-1] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>preHandle +2023-08-09 15:07:27 [http-nio-8888-exec-1] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>postHandle +2023-08-09 15:07:27 [http-nio-8888-exec-1] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>afterCompletion +2023-08-09 15:08:07 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:08:07 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:08:17 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:08:17 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:08:35 [restartedMain] INFO c.k.s.SpringBootKwanApplication - Starting SpringBootKwanApplication using Java 1.8.0_321 on qinyingjiedeMacBook-Pro.local with PID 43406 (/Users/qinyingjie/Documents/idea-workspace/SpringBoot-kwan/target/classes started by qinyingjie in /Users/qinyingjie/Documents/idea-workspace/SpringBoot-kwan) +2023-08-09 15:08:35 [restartedMain] INFO c.k.s.SpringBootKwanApplication - No active profile set, falling back to 1 default profile: "default" +2023-08-09 15:08:35 [background-preinit] INFO o.h.validator.internal.util.Version - HV000001: Hibernate Validator 6.2.3.Final +2023-08-09 15:08:35 [restartedMain] INFO o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable +2023-08-09 15:08:35 [restartedMain] INFO o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' +2023-08-09 15:08:36 [restartedMain] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2023-08-09 15:08:36 [restartedMain] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode. +2023-08-09 15:08:36 [restartedMain] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 26 ms. Found 0 Redis repository interfaces. +2023-08-09 15:08:36 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'io.seata.spring.boot.autoconfigure.SeataAutoConfiguration$SeataDataSourceConfiguration' of type [io.seata.spring.boot.autoconfigure.SeataAutoConfiguration$SeataDataSourceConfiguration$$EnhancerBySpringCGLIB$$119cee2a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:36 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.cloud.alibaba.seata-io.seata.spring.boot.autoconfigure.properties.SpringCloudAlibabaConfiguration' of type [io.seata.spring.boot.autoconfigure.properties.SpringCloudAlibabaConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:36 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'seata-io.seata.spring.boot.autoconfigure.properties.SeataProperties' of type [io.seata.spring.boot.autoconfigure.properties.SeataProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'io.seata.spring.boot.autoconfigure.SeataAutoConfiguration' of type [io.seata.spring.boot.autoconfigure.SeataAutoConfiguration$$EnhancerBySpringCGLIB$$1be2ce5f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'springApplicationContextProvider' of type [io.seata.spring.boot.autoconfigure.provider.SpringApplicationContextProvider] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'failureHandler' of type [io.seata.tm.api.DefaultFailureHandlerImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO i.s.s.b.a.SeataAutoConfiguration - Automatically configure Seata +2023-08-09 15:08:37 [restartedMain] INFO io.seata.config.FileConfiguration - The file name of the operation is registry +2023-08-09 15:08:37 [restartedMain] INFO io.seata.config.ConfigurationFactory - load Configuration:FileConfiguration$$EnhancerByCGLIB$$862af1eb +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'configProperties' of type [io.seata.spring.boot.autoconfigure.properties.config.ConfigProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'configFileProperties' of type [io.seata.spring.boot.autoconfigure.properties.config.ConfigFileProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO io.seata.config.FileConfiguration - The file name of the operation is file.conf +2023-08-09 15:08:37 [restartedMain] INFO io.seata.config.ConfigurationFactory - load Configuration:FileConfiguration$$EnhancerByCGLIB$$862af1eb +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'serviceProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.ServiceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Initializing Global Transaction Clients ... +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'threadFactoryProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.ThreadFactoryProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'transportProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.TransportProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO i.s.c.rpc.netty.NettyClientBootstrap - NettyClientBootstrap has started +2023-08-09 15:08:37 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Transaction Manager Client is initialized. applicationId[spring-boot-name] txServiceGroup[default_tx_group] +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'rmProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.RmProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO io.seata.rm.datasource.AsyncWorker - Async Commit Buffer Limit: 10000 +2023-08-09 15:08:37 [restartedMain] INFO i.s.r.d.xa.ResourceManagerXA - ResourceManagerXA init ... +2023-08-09 15:08:37 [restartedMain] INFO i.s.c.rpc.netty.NettyClientBootstrap - NettyClientBootstrap has started +2023-08-09 15:08:37 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Resource Manager is initialized. applicationId[spring-boot-name] txServiceGroup[default_tx_group] +2023-08-09 15:08:37 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Global Transaction Clients are initialized. +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.datasource.dynamic-com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$bbb740d4] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:37 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'dsProcessor' of type [com.baomidou.dynamic.datasource.processor.DsHeaderProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:08:38 [restartedMain] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8888 (http) +2023-08-09 15:08:38 [restartedMain] INFO o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8888"] +2023-08-09 15:08:38 [restartedMain] INFO o.a.catalina.core.StandardService - Starting service [Tomcat] +2023-08-09 15:08:38 [restartedMain] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.60] +2023-08-09 15:08:38 [restartedMain] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2023-08-09 15:08:38 [restartedMain] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 3025 ms +2023-08-09 15:08:38 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource detect ALIBABA SEATA and enabled it +2023-08-09 15:08:39 [restartedMain] INFO c.alibaba.druid.pool.DruidDataSource - {dataSource-1,kwan-ds} inited +2023-08-09 15:08:39 [restartedMain] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:08:39 [restartedMain] INFO c.alibaba.druid.pool.DruidDataSource - {dataSource-2,ali-ds} inited +2023-08-09 15:08:39 [restartedMain] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:08:39 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource - add a datasource named [kwan-ds] success +2023-08-09 15:08:39 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource - add a datasource named [ali-ds] success +2023-08-09 15:08:39 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource initial loaded [2] datasource,primary datasource named [kwan-ds] +2023-08-09 15:08:39 [restartedMain] INFO i.s.s.a.d.SeataAutoDataSourceProxyCreator - Auto proxy of [dataSource] +2023-08-09 15:08:39 [restartedMain] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:08:40 [restartedMain] INFO c.k.s.config.RedisConfig - ==================自定义的redisTemplate实例化了=================== +2023-08-09 15:08:40 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Bean[com.kwan.springbootkwan.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$9d2a6f35] with name [userServiceImpl] would use interceptor [io.seata.spring.annotation.GlobalTransactionalInterceptor] +2023-08-09 15:08:42 [restartedMain] INFO o.s.b.d.a.OptionalLiveReloadServer - LiveReload server is running on port 35729 +2023-08-09 15:08:43 [restartedMain] INFO o.s.b.c.r.s.JobRepositoryFactoryBean - No database type set, using meta data indicating: MYSQL +2023-08-09 15:08:43 [restartedMain] INFO o.s.b.c.l.support.SimpleJobLauncher - No TaskExecutor has been set, defaulting to synchronous executor. +2023-08-09 15:08:43 [restartedMain] INFO o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8888"] +2023-08-09 15:08:43 [restartedMain] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8888 (http) with context path '' +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - Context refreshed +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.s.ApiListingReferenceScanner - Scanning for api listing references +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_1 +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectOneUsingGET_1 +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: deleteUsingDELETE_1 +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: insertUsingPOST_1 +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_2 +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_3 +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectOneUsingGET_2 +2023-08-09 15:08:43 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: updateUsingPUT_1 +2023-08-09 15:08:44 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: deleteUsingDELETE_2 +2023-08-09 15:08:44 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: insertUsingPOST_2 +2023-08-09 15:08:44 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_4 +2023-08-09 15:08:44 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectOneUsingGET_3 +2023-08-09 15:08:44 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: updateUsingPUT_2 +2023-08-09 15:08:44 [restartedMain] INFO c.k.s.SpringBootKwanApplication - Started SpringBootKwanApplication in 9.621 seconds (JVM running for 12.024) +2023-08-09 15:08:44 [http-nio-8888-exec-2] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2023-08-09 15:08:44 [http-nio-8888-exec-2] INFO o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2023-08-09 15:08:44 [http-nio-8888-exec-2] INFO o.s.web.servlet.DispatcherServlet - Completed initialization in 4 ms +2023-08-09 15:08:44 [http-nio-8888-exec-2] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>preHandle +2023-08-09 15:08:44 [http-nio-8888-exec-2] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>postHandle +2023-08-09 15:08:44 [http-nio-8888-exec-2] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>afterCompletion +2023-08-09 15:09:37 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:09:37 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:09:47 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:09:47 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:09:57 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:09:57 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:07 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:07 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:17 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:17 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:27 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:27 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:37 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:37 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:47 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:47 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:57 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:10:57 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:07 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:07 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:17 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:17 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:27 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:27 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:37 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:37 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:47 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:47 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:57 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:11:57 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:07 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:07 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:17 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:17 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:27 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:27 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:37 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:37 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:47 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:47 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:57 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:12:57 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:07 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:07 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:17 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:17 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:27 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:27 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:37 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:37 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:47 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:47 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:57 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:13:57 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:07 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:07 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:17 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:17 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:27 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:27 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:37 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:37 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:47 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:47 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:57 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:14:57 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:15:14 [restartedMain] INFO c.k.s.SpringBootKwanApplication - Starting SpringBootKwanApplication using Java 1.8.0_321 on qinyingjiedeMacBook-Pro.local with PID 44533 (/Users/qinyingjie/Documents/idea-workspace/SpringBoot-kwan/target/classes started by qinyingjie in /Users/qinyingjie/Documents/idea-workspace/SpringBoot-kwan) +2023-08-09 15:15:14 [restartedMain] INFO c.k.s.SpringBootKwanApplication - No active profile set, falling back to 1 default profile: "default" +2023-08-09 15:15:14 [background-preinit] INFO o.h.validator.internal.util.Version - HV000001: Hibernate Validator 6.2.3.Final +2023-08-09 15:15:14 [restartedMain] INFO o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable +2023-08-09 15:15:14 [restartedMain] INFO o.s.b.d.e.DevToolsPropertyDefaultsPostProcessor - For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' +2023-08-09 15:15:15 [restartedMain] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! +2023-08-09 15:15:15 [restartedMain] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode. +2023-08-09 15:15:15 [restartedMain] INFO o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 27 ms. Found 0 Redis repository interfaces. +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'io.seata.spring.boot.autoconfigure.SeataAutoConfiguration$SeataDataSourceConfiguration' of type [io.seata.spring.boot.autoconfigure.SeataAutoConfiguration$SeataDataSourceConfiguration$$EnhancerBySpringCGLIB$$645bbfa2] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.cloud.alibaba.seata-io.seata.spring.boot.autoconfigure.properties.SpringCloudAlibabaConfiguration' of type [io.seata.spring.boot.autoconfigure.properties.SpringCloudAlibabaConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'seata-io.seata.spring.boot.autoconfigure.properties.SeataProperties' of type [io.seata.spring.boot.autoconfigure.properties.SeataProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'io.seata.spring.boot.autoconfigure.SeataAutoConfiguration' of type [io.seata.spring.boot.autoconfigure.SeataAutoConfiguration$$EnhancerBySpringCGLIB$$6ea19fd7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'springApplicationContextProvider' of type [io.seata.spring.boot.autoconfigure.provider.SpringApplicationContextProvider] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'failureHandler' of type [io.seata.tm.api.DefaultFailureHandlerImpl] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO i.s.s.b.a.SeataAutoConfiguration - Automatically configure Seata +2023-08-09 15:15:16 [restartedMain] INFO io.seata.config.FileConfiguration - The file name of the operation is registry +2023-08-09 15:15:16 [restartedMain] INFO io.seata.config.ConfigurationFactory - load Configuration:FileConfiguration$$EnhancerByCGLIB$$862af1eb +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'configProperties' of type [io.seata.spring.boot.autoconfigure.properties.config.ConfigProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'configFileProperties' of type [io.seata.spring.boot.autoconfigure.properties.config.ConfigFileProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO io.seata.config.FileConfiguration - The file name of the operation is file.conf +2023-08-09 15:15:16 [restartedMain] INFO io.seata.config.ConfigurationFactory - load Configuration:FileConfiguration$$EnhancerByCGLIB$$862af1eb +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'serviceProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.ServiceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Initializing Global Transaction Clients ... +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'threadFactoryProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.ThreadFactoryProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'transportProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.TransportProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO i.s.c.rpc.netty.NettyClientBootstrap - NettyClientBootstrap has started +2023-08-09 15:15:16 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Transaction Manager Client is initialized. applicationId[spring-boot-name] txServiceGroup[default_tx_group] +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'rmProperties' of type [io.seata.spring.boot.autoconfigure.properties.client.RmProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO io.seata.rm.datasource.AsyncWorker - Async Commit Buffer Limit: 10000 +2023-08-09 15:15:16 [restartedMain] INFO i.s.r.d.xa.ResourceManagerXA - ResourceManagerXA init ... +2023-08-09 15:15:16 [restartedMain] INFO i.s.c.rpc.netty.NettyClientBootstrap - NettyClientBootstrap has started +2023-08-09 15:15:16 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Resource Manager is initialized. applicationId[spring-boot-name] txServiceGroup[default_tx_group] +2023-08-09 15:15:16 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Global Transaction Clients are initialized. +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.datasource.dynamic-com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration' of type [com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration$$EnhancerBySpringCGLIB$$e76124c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:16 [restartedMain] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'dsProcessor' of type [com.baomidou.dynamic.datasource.processor.DsHeaderProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-08-09 15:15:17 [restartedMain] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8888 (http) +2023-08-09 15:15:17 [restartedMain] INFO o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8888"] +2023-08-09 15:15:17 [restartedMain] INFO o.a.catalina.core.StandardService - Starting service [Tomcat] +2023-08-09 15:15:17 [restartedMain] INFO o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/9.0.60] +2023-08-09 15:15:17 [restartedMain] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext +2023-08-09 15:15:17 [restartedMain] INFO o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 3211 ms +2023-08-09 15:15:18 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource detect ALIBABA SEATA and enabled it +2023-08-09 15:15:18 [restartedMain] INFO c.alibaba.druid.pool.DruidDataSource - {dataSource-1,kwan-ds} inited +2023-08-09 15:15:18 [restartedMain] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:15:18 [restartedMain] INFO c.alibaba.druid.pool.DruidDataSource - {dataSource-2,ali-ds} inited +2023-08-09 15:15:20 [restartedMain] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:15:20 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource - add a datasource named [kwan-ds] success +2023-08-09 15:15:20 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource - add a datasource named [ali-ds] success +2023-08-09 15:15:20 [restartedMain] INFO c.b.d.d.DynamicRoutingDataSource - dynamic-datasource initial loaded [2] datasource,primary datasource named [kwan-ds] +2023-08-09 15:15:20 [restartedMain] INFO i.s.s.a.d.SeataAutoDataSourceProxyCreator - Auto proxy of [dataSource] +2023-08-09 15:15:20 [restartedMain] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:15:21 [restartedMain] INFO c.k.s.config.RedisConfig - ==================自定义的redisTemplate实例化了=================== +2023-08-09 15:15:21 [restartedMain] INFO i.s.s.a.GlobalTransactionScanner - Bean[com.kwan.springbootkwan.service.impl.UserServiceImpl$$EnhancerBySpringCGLIB$$3a3a301c] with name [userServiceImpl] would use interceptor [io.seata.spring.annotation.GlobalTransactionalInterceptor] +2023-08-09 15:15:22 [restartedMain] INFO o.s.b.d.a.OptionalLiveReloadServer - LiveReload server is running on port 35729 +2023-08-09 15:15:23 [restartedMain] INFO o.s.b.c.r.s.JobRepositoryFactoryBean - No database type set, using meta data indicating: MYSQL +2023-08-09 15:15:23 [restartedMain] INFO o.s.b.c.l.support.SimpleJobLauncher - No TaskExecutor has been set, defaulting to synchronous executor. +2023-08-09 15:15:23 [restartedMain] INFO o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8888"] +2023-08-09 15:15:23 [restartedMain] INFO o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port(s): 8888 (http) with context path '' +2023-08-09 15:15:23 [restartedMain] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - Context refreshed +2023-08-09 15:15:23 [restartedMain] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - Found 1 custom documentation plugin(s) +2023-08-09 15:15:23 [restartedMain] INFO s.d.s.w.s.ApiListingReferenceScanner - Scanning for api listing references +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_1 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectOneUsingGET_1 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: deleteUsingDELETE_1 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: insertUsingPOST_1 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_2 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_3 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectOneUsingGET_2 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: updateUsingPUT_1 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: deleteUsingDELETE_2 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: insertUsingPOST_2 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectAllUsingGET_4 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: selectOneUsingGET_3 +2023-08-09 15:15:24 [restartedMain] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: updateUsingPUT_2 +2023-08-09 15:15:24 [restartedMain] INFO c.k.s.SpringBootKwanApplication - Started SpringBootKwanApplication in 10.542 seconds (JVM running for 12.971) +2023-08-09 15:15:27 [http-nio-8888-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet' +2023-08-09 15:15:27 [http-nio-8888-exec-1] INFO o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet' +2023-08-09 15:15:27 [http-nio-8888-exec-1] INFO o.s.web.servlet.DispatcherServlet - Completed initialization in 8 ms +2023-08-09 15:15:27 [http-nio-8888-exec-1] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>preHandle +2023-08-09 15:15:30 [http-nio-8888-exec-1] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>postHandle +2023-08-09 15:15:30 [http-nio-8888-exec-1] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>afterCompletion +2023-08-09 15:15:45 [http-nio-8888-exec-3] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>preHandle +2023-08-09 15:15:46 [http-nio-8888-exec-3] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>postHandle +2023-08-09 15:15:46 [http-nio-8888-exec-3] INFO c.k.s.config.MyInterceptor - MyInterceptor>>>>>>>>>afterCompletion +2023-08-09 15:16:16 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:16:16 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:16:26 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:16:26 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:16:36 [timeoutChecker_1_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct +2023-08-09 15:16:36 [timeoutChecker_2_1] ERROR i.s.c.r.n.NettyClientChannelManager - can not get cluster name in registry config 'service.vgroupMapping.default_tx_group', please make sure registry config correct diff --git a/src/main/java/com/kwan/springbootkwan/controller/PicInfoController.java b/src/main/java/com/kwan/springbootkwan/controller/PicInfoController.java index 41a2494..489a44e 100644 --- a/src/main/java/com/kwan/springbootkwan/controller/PicInfoController.java +++ b/src/main/java/com/kwan/springbootkwan/controller/PicInfoController.java @@ -42,7 +42,7 @@ public class PicInfoController { /** - * 分页查询所有数据 + * 分页查询图片 * * @return 所有数据 */ @@ -91,6 +91,19 @@ public class PicInfoController { return Result.ok(this.picInfoService.save(picInfo)); } + + /** + * 新增图片 + * + * @param path + * @return + */ + @PostMapping(value = "/insertByPath") + public Result insertByPath(@RequestParam String path) { + return Result.ok(this.picInfoService.insertByPath(path)); + } + + /** * 修改数据 * diff --git a/src/main/java/com/kwan/springbootkwan/service/PicInfoService.java b/src/main/java/com/kwan/springbootkwan/service/PicInfoService.java index 500fe67..3465940 100644 --- a/src/main/java/com/kwan/springbootkwan/service/PicInfoService.java +++ b/src/main/java/com/kwan/springbootkwan/service/PicInfoService.java @@ -11,5 +11,6 @@ import com.kwan.springbootkwan.entity.PicInfo; */ public interface PicInfoService extends IService { + boolean insertByPath(String path); } diff --git a/src/main/java/com/kwan/springbootkwan/service/impl/PicInfoServiceImpl.java b/src/main/java/com/kwan/springbootkwan/service/impl/PicInfoServiceImpl.java index 5570d2b..a43c786 100644 --- a/src/main/java/com/kwan/springbootkwan/service/impl/PicInfoServiceImpl.java +++ b/src/main/java/com/kwan/springbootkwan/service/impl/PicInfoServiceImpl.java @@ -1,11 +1,20 @@ package com.kwan.springbootkwan.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.kwan.springbootkwan.entity.PicInfo; import com.kwan.springbootkwan.mapper.PicInfoMapper; import com.kwan.springbootkwan.service.PicInfoService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.io.IOException; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Objects; + /** * 图片信息表(PicInfo)表服务实现类 * @@ -15,5 +24,39 @@ import org.springframework.stereotype.Service; @Service("picInfoService") public class PicInfoServiceImpl extends ServiceImpl implements PicInfoService { + @Autowired + private PicInfoMapper picInfoMapper; + /** + * 图片路径前缀 + */ + private static final String PRE_FIX = "https://gitcode.net/qyj19920704/baby-images/-/raw/main/"; + + @Override + public boolean insertByPath(String path) { + Path directoryPath = Paths.get(path); + try (DirectoryStream directoryStream = Files.newDirectoryStream(directoryPath)) { + for (Path filePath : directoryStream) { + if (Files.isRegularFile(filePath)) { + final String picName = filePath.getFileName().toString(); + String picPath = PRE_FIX + picName; + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq("pic_url", picPath); + wrapper.eq("is_delete", 0); + final PicInfo pic = picInfoMapper.selectOne(wrapper); + if(Objects.nonNull(pic)){ + continue; + } + PicInfo picInfo = new PicInfo(); + picInfo.setPicName(picName); + picInfo.setPicUrl(picPath); + picInfoMapper.insert(picInfo); + } + } + return true; + } catch (IOException e) { + e.printStackTrace(); + } + return false; + } } -- GitLab