diff --git a/cloud-property-server/src/main/java/com/muyu/server/mapper/TableRunNameMapper.java b/cloud-property-server/src/main/java/com/muyu/server/mapper/TableRunNameMapper.java new file mode 100644 index 0000000..c287cd9 --- /dev/null +++ b/cloud-property-server/src/main/java/com/muyu/server/mapper/TableRunNameMapper.java @@ -0,0 +1,16 @@ +package com.muyu.server.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.muyu.common.domain.TableNames; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Author:yang + * @Package:com.muyu.server.mapper + * @Project:cloud-property + * @name:TableRunNameMapper + * @Date:2024/8/27 21:48 + */ +@Mapper +public interface TableRunNameMapper extends BaseMapper { +} diff --git a/cloud-property-server/src/main/java/com/muyu/server/service/TableRunNameService.java b/cloud-property-server/src/main/java/com/muyu/server/service/TableRunNameService.java index d596e5c..aa4630f 100644 --- a/cloud-property-server/src/main/java/com/muyu/server/service/TableRunNameService.java +++ b/cloud-property-server/src/main/java/com/muyu/server/service/TableRunNameService.java @@ -1,5 +1,6 @@ package com.muyu.server.service; +import com.baomidou.mybatisplus.extension.service.IService; import com.muyu.common.domain.TableNames; import java.util.List; @@ -11,7 +12,7 @@ import java.util.List; * @name:TableRunNameService * @Date:2024/8/27 20:49 */ -public interface TableRunNameService { +public interface TableRunNameService extends IService { /** * 获取数据库表名 diff --git a/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataNameServiceImpl.java b/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataNameServiceImpl.java index 05306e2..004b5cd 100644 --- a/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataNameServiceImpl.java +++ b/cloud-property-server/src/main/java/com/muyu/server/service/impl/DataNameServiceImpl.java @@ -55,7 +55,7 @@ public class DataNameServiceImpl list.add(new DataName(0,database)); } JdbcHelper.close(conn,preparedStatement,rs); - dataRunNameService.addDataRunName(list); +// dataRunNameService.addDataRunName(list); return list; } catch (SQLException e) { e.printStackTrace(); diff --git a/cloud-property-server/src/main/java/com/muyu/server/service/impl/TableRunNameServiceImpl.java b/cloud-property-server/src/main/java/com/muyu/server/service/impl/TableRunNameServiceImpl.java index 6c80a48..45bd465 100644 --- a/cloud-property-server/src/main/java/com/muyu/server/service/impl/TableRunNameServiceImpl.java +++ b/cloud-property-server/src/main/java/com/muyu/server/service/impl/TableRunNameServiceImpl.java @@ -1,7 +1,9 @@ package com.muyu.server.service.impl; import com.alibaba.druid.pool.DruidDataSource; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.muyu.common.domain.TableNames; +import com.muyu.server.mapper.TableRunNameMapper; import com.muyu.server.service.TableRunNameService; import com.muyu.server.util.JdbcHelper; import org.springframework.stereotype.Service; @@ -21,7 +23,9 @@ import java.util.List; * @Date:2024/8/27 20:50 */ @Service -public class TableRunNameServiceImpl implements TableRunNameService { +public class TableRunNameServiceImpl + extends ServiceImpl + implements TableRunNameService { /** * 获取数据库表名 diff --git a/logs/cloud-property/info.log b/logs/cloud-property/info.log index 05e8148..1a8a234 100644 --- a/logs/cloud-property/info.log +++ b/logs/cloud-property/info.log @@ -95,3 +95,46 @@ 20:41:19.785 [main] INFO c.b.d.d.d.DefaultDataSourceDestroyer - [destroy,98] - dynamic-datasource close the datasource named [master] success, 20:41:19.786 [main] INFO c.b.d.d.DynamicRoutingDataSource - [destroy,219] - dynamic-datasource all closed success,bye 20:41:19.787 [main] INFO o.a.c.c.StandardService - [log,173] - Stopping service [Tomcat] +20:54:22.949 [main] INFO c.m.s.IntegrationApplication - [logStartupProfileInfo,660] - The following 1 profile is active: "dev" +20:54:24.870 [main] INFO o.a.c.c.StandardService - [log,173] - Starting service [Tomcat] +20:54:24.870 [main] INFO o.a.c.c.StandardEngine - [log,173] - Starting Servlet engine: [Apache Tomcat/10.1.24] +20:54:24.935 [main] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring embedded WebApplicationContext +20:54:28.113 [main] INFO c.a.d.p.DruidDataSource - [init,1002] - {dataSource-1,master} inited +20:54:28.115 [main] INFO c.b.d.d.DynamicRoutingDataSource - [addDataSource,158] - dynamic-datasource - add a datasource named [master] success +20:54:28.115 [main] INFO c.b.d.d.DynamicRoutingDataSource - [afterPropertiesSet,241] - dynamic-datasource initial loaded [1] datasource,primary datasource named [master] +20:54:28.961 [main] INFO c.a.c.s.SentinelWebMvcConfigurer - [addInterceptors,52] - [Sentinel Starter] register SentinelWebInterceptor with urlPatterns: [/**]. +20:54:33.711 [main] INFO c.m.r.RabbitConfig - [init,29] - rabbitMQ启动成功 +20:54:36.937 [main] INFO c.a.n.client.naming - [initNamespaceForNaming,62] - initializer namespace from ans.namespace attribute : null +20:54:36.938 [main] INFO c.a.n.client.naming - [lambda$initNamespaceForNaming$0,66] - initializer namespace from ALIBABA_ALIWARE_NAMESPACE attribute :null +20:54:36.938 [main] INFO c.a.n.client.naming - [lambda$initNamespaceForNaming$1,73] - initializer namespace from namespace attribute :null +20:54:36.942 [main] INFO c.a.n.client.naming - [,74] - FailoverDataSource type is class com.alibaba.nacos.client.naming.backups.datasource.DiskFailoverDataSource +20:54:36.948 [main] INFO c.a.n.p.a.s.c.ClientAuthPluginManager - [init,56] - [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.impl.NacosClientAuthServiceImpl success. +20:54:36.948 [main] INFO c.a.n.p.a.s.c.ClientAuthPluginManager - [init,56] - [ClientAuthPluginManager] Load ClientAuthService com.alibaba.nacos.client.auth.ram.RamClientAuthServiceImpl success. +20:54:37.063 [main] INFO c.a.n.c.r.client - [lambda$createClient$0,118] - [RpcClientFactory] create a new rpc client of 44d5c605-28ea-4854-9eab-18bf6b1c201f +20:54:37.065 [main] INFO c.a.n.client.naming - [,109] - Create naming rpc client for uuid->44d5c605-28ea-4854-9eab-18bf6b1c201f +20:54:37.066 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [44d5c605-28ea-4854-9eab-18bf6b1c201f] RpcClient init, ServerListFactory = com.alibaba.nacos.client.naming.core.ServerListManager +20:54:37.066 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [44d5c605-28ea-4854-9eab-18bf6b1c201f] Registry connection listener to current client:com.alibaba.nacos.client.naming.remote.gprc.redo.NamingGrpcRedoService +20:54:37.066 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [44d5c605-28ea-4854-9eab-18bf6b1c201f] Register server push request handler:com.alibaba.nacos.client.naming.remote.gprc.NamingPushRequestHandler +20:54:37.067 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [44d5c605-28ea-4854-9eab-18bf6b1c201f] Try to connect to server on start up, server: {serverIp = '21.12.0.8', server main port = 8848} +20:54:37.067 [main] INFO c.a.n.c.r.c.g.GrpcClient - [createNewManagedChannel,210] - grpc client connection server:21.12.0.8 ip,serverPort:9848,grpcTslConfig:{"sslProvider":"","enableTls":false,"mutualAuthEnable":false,"trustAll":false} +20:54:37.157 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [44d5c605-28ea-4854-9eab-18bf6b1c201f] Success to connect to server [21.12.0.8:8848] on start up, connectionId = 1724763275460_21.12.0.11_63210 +20:54:37.157 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [44d5c605-28ea-4854-9eab-18bf6b1c201f] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$ConnectResetRequestHandler +20:54:37.157 [main] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [44d5c605-28ea-4854-9eab-18bf6b1c201f] Register server push request handler:com.alibaba.nacos.common.remote.client.RpcClient$$Lambda$576/0x000001b4814d0228 +20:54:37.157 [com.alibaba.nacos.client.remote.worker.0] INFO c.a.n.c.r.client - [printIfInfoEnabled,63] - [44d5c605-28ea-4854-9eab-18bf6b1c201f] Notify connected event to listeners. +20:54:37.157 [com.alibaba.nacos.client.remote.worker.0] INFO c.a.n.client.naming - [onConnected,90] - Grpc connection connect +20:54:37.158 [main] INFO c.a.n.client.naming - [registerService,133] - [REGISTER-SERVICE] ec66ecf1-f28e-43bc-aa86-625f1bc53bf8 registering service cloud-property with instance Instance{instanceId='null', ip='192.168.1.123', port=9701, weight=1.0, healthy=true, enabled=true, ephemeral=true, clusterName='DEFAULT', serviceName='null', metadata={IPv6=null, preserved.register.source=SPRING_CLOUD}} +20:54:37.192 [main] INFO c.a.c.n.r.NacosServiceRegistry - [register,76] - nacos registry, DEFAULT_GROUP cloud-property 192.168.1.123:9701 register finished +20:54:38.331 [main] INFO c.m.s.IntegrationApplication - [logStarted,56] - Started IntegrationApplication in 21.504 seconds (process running for 22.678) +20:54:38.341 [main] INFO c.a.n.c.c.i.CacheData - [initNotifyWarnTimeout,72] - config listener notify warn timeout millis use default 60000 millis +20:54:38.341 [main] INFO c.a.n.c.c.i.CacheData - [,99] - nacos.cache.data.init.snapshot = true +20:54:38.342 [main] INFO c.a.n.c.c.i.ClientWorker - [addCacheDataIfAbsent,416] - [fixed-ec66ecf1-f28e-43bc-aa86-625f1bc53bf8-21.12.0.8_8848] [subscribe] cloud-property.yml+DEFAULT_GROUP+ec66ecf1-f28e-43bc-aa86-625f1bc53bf8 +20:54:38.348 [main] INFO c.a.n.c.c.i.CacheData - [addListener,236] - [fixed-ec66ecf1-f28e-43bc-aa86-625f1bc53bf8-21.12.0.8_8848] [add-listener] ok, tenant=ec66ecf1-f28e-43bc-aa86-625f1bc53bf8, dataId=cloud-property.yml, group=DEFAULT_GROUP, cnt=1 +20:54:38.348 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-property.yml, group=DEFAULT_GROUP +20:54:38.349 [main] INFO c.a.n.c.c.i.ClientWorker - [addCacheDataIfAbsent,416] - [fixed-ec66ecf1-f28e-43bc-aa86-625f1bc53bf8-21.12.0.8_8848] [subscribe] cloud-property+DEFAULT_GROUP+ec66ecf1-f28e-43bc-aa86-625f1bc53bf8 +20:54:38.349 [main] INFO c.a.n.c.c.i.CacheData - [addListener,236] - [fixed-ec66ecf1-f28e-43bc-aa86-625f1bc53bf8-21.12.0.8_8848] [add-listener] ok, tenant=ec66ecf1-f28e-43bc-aa86-625f1bc53bf8, dataId=cloud-property, group=DEFAULT_GROUP, cnt=1 +20:54:38.349 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-property, group=DEFAULT_GROUP +20:54:38.351 [main] INFO c.a.n.c.c.i.ClientWorker - [addCacheDataIfAbsent,416] - [fixed-ec66ecf1-f28e-43bc-aa86-625f1bc53bf8-21.12.0.8_8848] [subscribe] cloud-property-dev.yml+DEFAULT_GROUP+ec66ecf1-f28e-43bc-aa86-625f1bc53bf8 +20:54:38.351 [main] INFO c.a.n.c.c.i.CacheData - [addListener,236] - [fixed-ec66ecf1-f28e-43bc-aa86-625f1bc53bf8-21.12.0.8_8848] [add-listener] ok, tenant=ec66ecf1-f28e-43bc-aa86-625f1bc53bf8, dataId=cloud-property-dev.yml, group=DEFAULT_GROUP, cnt=1 +20:54:38.351 [main] INFO c.a.c.n.r.NacosContextRefresher - [registerNacosListener,131] - [Nacos Config] Listening config: dataId=cloud-property-dev.yml, group=DEFAULT_GROUP +20:54:38.872 [RMI TCP Connection(1)-192.168.1.123] INFO o.a.c.c.C.[.[.[/] - [log,173] - Initializing Spring DispatcherServlet 'dispatcherServlet' +20:55:05.586 [http-nio-9701-exec-3] INFO c.a.d.p.DruidDataSource - [init,1002] - {dataSource-2} inited