diff --git a/db/1schema.sql b/db/1schema.sql index d3f070ea0..ff544d375 100644 --- a/db/1schema.sql +++ b/db/1schema.sql @@ -11,4 +11,7 @@ create database `pigxx_zipkin` default character set utf8mb4 collate utf8mb4_gen create database `pigxx_job` default character set utf8mb4 collate utf8mb4_general_ci; -- pigx 公众号管理模块 -create database `pigxx_mp` default character set utf8mb4 collate utf8mb4_general_ci; \ No newline at end of file +create database `pigxx_mp` default character set utf8mb4 collate utf8mb4_general_ci; + +-- pigx 公众号管理模块 +create database `pigxx_config` default character set utf8mb4 collate utf8mb4_general_ci; \ No newline at end of file diff --git a/db/7pigxx_config.sql b/db/7pigxx_config.sql new file mode 100644 index 000000000..23216585e --- /dev/null +++ b/db/7pigxx_config.sql @@ -0,0 +1,243 @@ +/* + Navicat Premium Data Transfer + + Source Server : localhost + Source Server Type : MySQL + Source Server Version : 50723 + Source Host : localhost + Source Database : nacos + + Target Server Type : MySQL + Target Server Version : 50723 + File Encoding : utf-8 + + Date: 04/20/2019 16:36:33 PM +*/ +USE pigxx_config; + +SET NAMES utf8; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for `config_info` +-- ---------------------------- +DROP TABLE IF EXISTS `config_info`; +CREATE TABLE `config_info` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', + `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id', + `group_id` varchar(255) COLLATE utf8_bin DEFAULT NULL, + `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content', + `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5', + `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间', + `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间', + `src_user` text COLLATE utf8_bin COMMENT 'source user', + `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip', + `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL, + `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段', + `c_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL, + `c_use` varchar(64) COLLATE utf8_bin DEFAULT NULL, + `effect` varchar(64) COLLATE utf8_bin DEFAULT NULL, + `type` varchar(64) COLLATE utf8_bin DEFAULT NULL, + `c_schema` text COLLATE utf8_bin, + PRIMARY KEY (`id`), + UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info'; + +-- ---------------------------- +-- Records of `config_info` +-- ---------------------------- +BEGIN; +INSERT INTO `config_info` VALUES ('1', 'application-dev.yml', 'DEFAULT_GROUP', '# 加解密根密码\njasypt:\n encryptor:\n password: pigx #根密码\n# redis 相关\nspring:\n redis:\n password:\n host: ${REDIS-HOST:pigx-redis}\n # zipkin\n zipkin:\n enabled: true\n base-url: http://${ZIPKIN-HOST:pigx-zipkin}\n sleuth:\n web:\n client:\n enabled: true\n sampler:\n # 默认的采样比率为0.1,不能看到所有请求数据\n # 更改采样比率为1,就能看到所有的请求数据了,但是这样会增加接口调用延迟\n probability: 1.0\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n\n# feign 配置\nfeign:\n hystrix:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n# hystrix If you need to use ThreadLocal bound variables in your RequestInterceptor`s\n# you will need to either set the thread isolation strategy for Hystrix to `SEMAPHORE or disable Hystrix in Feign.\nhystrix:\n command:\n default:\n execution:\n isolation:\n strategy: SEMAPHORE\n thread:\n timeoutInMilliseconds: 60000\n shareSecurityContext: true\n\n#请求处理的超时时间\nribbon:\n ReadTimeout: 10000\n ConnectTimeout: 10000\n\n# mybaits-plus配置\nmybatis-plus:\n # MyBatis Mapper所对应的XML文件位置\n mapper-locations: classpath:/mapper/*Mapper.xml\n global-config:\n # 关闭MP3.0自带的banner\n banner: false\n db-config:\n # 主键类型\n id-type: auto\n\n#swagger公共信息\nswagger:\n host: ${GATEWAY-HOST:pigx-gateway}:${GATEWAY-PORT:9999}\n title: PigX Swagger API\n description: 全宇宙最牛逼的Spring Cloud微服务开发脚手架\n version: \'@project.version@\'\n license: Powered By PigX\n licenseUrl: https://pig4cloud.com/\n terms-of-service-url: https://pig4cloud.com/\n contact:\n name: 冷冷\n email: wangiegie@gmail.com\n url: https://pig4cloud.com/about.html\n authorization:\n name: pigX OAuth\n auth-regex: ^.*$\n authorization-scope-list:\n - scope: server\n description: server all\n token-url-list:\n - http://${GATEWAY-HOST:pigx-gateway}:${GATEWAY-PORT:9999}/auth/oauth/token\n\n## spring security 配置\nsecurity:\n oauth2:\n client:\n # 默认放行url,如果子模块重写这里的配置就会被覆盖\n ignore-urls:\n - /actuator/**\n - /v2/api-docs\n resource:\n loadBalanced: true\n token-info-uri: http://${AUTH-HOST:pigx-auth}/oauth/check_token', '575cebbb771510b3afdc922502231a5b', '2019-04-18 02:10:20', '2019-04-18 02:24:13', null, '127.0.0.1', '', '', '通用配置文件', null, null, 'yaml', null), ('2', 'pigx-activiti-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n ignore-urls:\n - \'/actuator/**\'\n - \'/v2/api-docs\'\n - \'/editor-app/**\'\n - \'/modeler.html\'\n - \'/ws/**\'\nspring:\n autoconfigure:\n exclude: org.activiti.spring.boot.SecurityAutoConfiguration\n activiti:\n check-process-definitions: false\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_ac}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - oa_leave_bill', '9ba263596903db9dba9c812a06ebd3b3', '2019-04-18 02:10:56', '2019-04-18 02:10:56', null, '127.0.0.1', '', '', '工作流配置文件', null, null, 'yaml', null), ('3', 'pigx-auth-dev.yml', 'DEFAULT_GROUP', '# 数据源\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n freemarker:\n allow-request-override: false\n allow-session-override: false\n cache: true\n charset: UTF-8\n check-template-location: true\n content-type: text/html\n enabled: true\n expose-request-attributes: false\n expose-session-attributes: false\n expose-spring-macro-helpers: true\n prefer-file-system-access: true\n suffix: .ftl\n template-loader-path: classpath:/templates/', '2a84033a4e652efaa427b1869f276cea', '2019-04-18 02:11:32', '2019-04-18 02:11:32', null, '127.0.0.1', '', '', '认证中心配置文件', null, null, 'yaml', null), ('4', 'pigx-codegen-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\npigx:\n tenant:\n column: tenant_id\n tables:\n - sys_datasource_conf', '822e94558a8c507bf73d6843ae5ca7ad', '2019-04-18 02:12:10', '2019-04-18 02:12:10', null, '127.0.0.1', '', '', '代码生成', null, null, 'yaml', null), ('5', 'pigx-daemon-elastic-job-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n## 定时任务\nspring:\n # 保存定时任务的数据源\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n elasticjob:\n # 分布式任务协调依赖zookeeper\n zookeeper:\n server-lists: ${ZOOKEEPER-HOST:pigx-zookeeper}:${ZOOKEEPER-PORT:2181}\n namespace: pigx-daemon\n # 普通任务\n simples:\n spring-simple-job:\n job-class: com.pig4cloud.pigx.daemon.elastic.job.PigxSimpleJob\n cron: 0 0 0/1 * * ?\n sharding-total-count: 3\n sharding-item-parameters: 0=service1,1=service2,2=service3\n eventTraceRdbDataSource: \'dataSource\'\n listener:\n listener-class: com.pig4cloud.pigx.daemon.elastic.listener.PigxElasticJobListener\n spring-simple-job2:\n job-class: com.pig4cloud.pigx.daemon.elastic.job.PigxSimpleJob2\n cron: 0 0 0/1 * * ?\n sharding-total-count: 3\n sharding-item-parameters: 0=service1,1=service2,2=service3\n eventTraceRdbDataSource: \'dataSource\'\n listener:\n listener-class: com.pig4cloud.pigx.daemon.elastic.listener.PigxElasticJobListener\n # 简单任务\n dataflows:\n spring-dataflow-job:\n job-class: com.pig4cloud.pigx.daemon.elastic.job.PigxDataflowJob\n cron: 0 0 0/1 * * ?\n sharding-total-count: 3\n sharding-item-parameters: 0=service1,1=service2,2=service3\n streaming-process: true\n eventTraceRdbDataSource: \'dataSource\'\n listener:\n distributed-listener-class: com.pig4cloud.pigx.daemon.elastic.listener.PigxDistributeElasticJobListener\n started-timeout-milliseconds: 5000\n completed-timeout-milliseconds: 10000', 'e491142fc720dea9e8acb67d3b89f017', '2019-04-18 02:12:57', '2019-04-18 02:12:57', null, '127.0.0.1', '', '', '定时任务-elastic-job配置', null, null, 'yaml', null), ('7', 'pigx-gateway-dev.yml', 'DEFAULT_GROUP', 'security:\n encode:\n # 前端密码密钥,必须16位\n key: \'pigxpigxpigxpigx\'\n\n# 不校验验证码终端\nignore:\n clients:\n - test\n swagger-providers:\n - ${AUTH-HOST:pigx-auth}\n - ${TX-MGR-HOST:pigx-tx-manager}', '4a1833d875a5e008837cf36f5c0f4c41', '2019-04-18 02:13:52', '2019-04-18 02:13:52', null, '127.0.0.1', '', '', '网关配置文件', null, null, 'yaml', null), ('8', 'pigx-monitor-dev.yml', 'DEFAULT_GROUP', 'spring:\n # 安全配置\n security:\n user:\n name: ENC(rZHA4LW5hHmhLAAzJoFNag==) # pigx\n password: ENC(bjeyh+Aeii3kHXkoo00ZUw==) # pigx\n boot:\n admin:\n ui:\n resource-locations: \'classpath:/ui/,classpath:/static/\'\n template-location: \'classpath:/ui/\'\n title: \'pigx 服务状态监控\'\n brand: \'pigx 服务状态监控\'', 'd4caef8a7cad3d357ad2fcb9f57e9982', '2019-04-18 02:14:17', '2019-04-18 02:14:17', null, '127.0.0.1', '', '', '监控配置文件', null, null, 'yaml', null), ('12', 'pigx-zipkin-dev.yml', 'DEFAULT_GROUP', 'spring:\n # 数据源\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_zipkin}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\nmanagement:\n metrics:\n web:\n server:\n auto-time-requests: false\nzipkin:\n storage:\n type: mysql\nsleuth:\n enabled: true', 'd8390c0b219b97d5cad2776c651be9bd', '2019-04-18 02:16:50', '2019-04-18 02:16:50', null, '127.0.0.1', '', '', '链路跟踪配置文件', null, null, 'yaml', null), ('14', 'pigx-upms-biz-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n client-secret: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n scope: server\n\n# 数据源\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true\n\n# 文件系统 (提供测试环境,不要乱传)\nminio:\n url: https://minio.pig4cloud.com\n access-key: ENC(O4GgJmcJLQAnvfz+RRq65aps5HgbWQXZ)\n secret-key: ENC(O4GgJmcJLQAnvfz+RRq65aps5HgbWQXZ)\n\n# Logger Config\nlogging:\n level:\n com.pig4cloud.pigx.admin.mapper: debug\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - sys_user\n - sys_role\n - sys_dept\n - sys_log\n - sys_social_details\n - sys_dict\n - sys_dict_item\n - sys_log', 'd07edae79e0f4b991d5b3bdf594523dd', '2019-04-18 02:32:44', '2019-04-18 02:32:44', null, '127.0.0.1', '', '', 'admin 服务配置', null, null, 'yaml', null), ('15', 'pigx-tx-manager-dev.yml', 'DEFAULT_GROUP', '# 页面配置\nspring:\n mvc:\n static-path-pattern: /**\n resources:\n static-locations: classpath:/static/\n\n\n# LCN 配置\ntm:\n transaction:\n netty:\n delaytime: 5 # 客户端链接最大通讯时间 (秒)\n hearttime: 15 # 客户端心跳时间 (秒)\n redis:\n savemaxtime: 30 # redis 保存时间 (秒)\n socket:\n port: 9998 # 通讯端口\n maxconnection: 1000 #最大链接数\n compensate:\n auto: false #是否自动补偿\n notifyUrl: http://ip:port/path #补偿结果通知(配消息总线里面)\n tryTime: 30 # z再次重试时间间隔\n maxWaitTime: 5000 # 请求超时的最大时间 (毫秒)', '885f5c125f2df7a08692929ccce154be', '2019-04-18 02:54:03', '2019-04-18 02:54:03', null, '127.0.0.1', '', '', '分布式事务协调模块', null, null, 'yaml', null), ('17', 'pigx-mp-manager-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_mp}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n hikari:\n connection-init-sql: SET NAMES utf8mb4\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - wx_menu\n - wx_account\n - wx_account_fans\n - wx_fans_msg_res', '4c1b373da87269fec9059221002618de', '2019-04-18 03:00:10', '2019-04-18 03:00:10', null, '127.0.0.1', '', '', null, null, null, 'yaml', null), ('18', 'pigx-daemon-quartz-dev.yml', 'DEFAULT_GROUP', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n resources:\n static-locations: classpath:/static/,classpath:/views/\n quartz:\n #相关属性配置\n properties:\n org:\n quartz:\n scheduler:\n instanceName: clusteredScheduler\n instanceId: AUTO\n jobStore:\n class: org.quartz.impl.jdbcjobstore.JobStoreTX\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n clusterCheckinInterval: 10000\n useProperties: false\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 50\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n #数据库方式\n job-store-type: jdbc\n #初始化表结构\n #jdbc:\n #initialize-schema: never\n\n', '30d64fb3f5f60ee25558d42bc3d3210e', '2019-04-18 03:08:34', '2019-04-18 03:08:34', null, '127.0.0.1', '', '', 'quartz 配置文件', null, null, 'yaml', null); +COMMIT; + +-- ---------------------------- +-- Table structure for `config_info_aggr` +-- ---------------------------- +DROP TABLE IF EXISTS `config_info_aggr`; +CREATE TABLE `config_info_aggr` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', + `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id', + `group_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'group_id', + `datum_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'datum_id', + `content` longtext COLLATE utf8_bin NOT NULL COMMENT '内容', + `gmt_modified` datetime NOT NULL COMMENT '修改时间', + `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL, + `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段'; + +-- ---------------------------- +-- Table structure for `config_info_beta` +-- ---------------------------- +DROP TABLE IF EXISTS `config_info_beta`; +CREATE TABLE `config_info_beta` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', + `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id', + `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id', + `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name', + `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content', + `beta_ips` varchar(1024) COLLATE utf8_bin DEFAULT NULL COMMENT 'betaIps', + `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5', + `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间', + `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间', + `src_user` text COLLATE utf8_bin COMMENT 'source user', + `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip', + `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta'; + +-- ---------------------------- +-- Table structure for `config_info_tag` +-- ---------------------------- +DROP TABLE IF EXISTS `config_info_tag`; +CREATE TABLE `config_info_tag` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', + `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id', + `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id', + `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id', + `tag_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_id', + `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name', + `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content', + `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5', + `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间', + `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间', + `src_user` text COLLATE utf8_bin COMMENT 'source user', + `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL COMMENT 'source ip', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag'; + +-- ---------------------------- +-- Table structure for `config_tags_relation` +-- ---------------------------- +DROP TABLE IF EXISTS `config_tags_relation`; +CREATE TABLE `config_tags_relation` ( + `id` bigint(20) NOT NULL COMMENT 'id', + `tag_name` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'tag_name', + `tag_type` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT 'tag_type', + `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id', + `group_id` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'group_id', + `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id', + `nid` bigint(20) NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`nid`), + UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`), + KEY `idx_tenant_id` (`tenant_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation'; + +-- ---------------------------- +-- Table structure for `group_capacity` +-- ---------------------------- +DROP TABLE IF EXISTS `group_capacity`; +CREATE TABLE `group_capacity` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', + `group_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群', + `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值', + `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量', + `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值', + `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值', + `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值', + `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量', + `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间', + `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_group_id` (`group_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表'; + +-- ---------------------------- +-- Table structure for `his_config_info` +-- ---------------------------- +DROP TABLE IF EXISTS `his_config_info`; +CREATE TABLE `his_config_info` ( + `id` bigint(64) unsigned NOT NULL, + `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `data_id` varchar(255) COLLATE utf8_bin NOT NULL, + `group_id` varchar(128) COLLATE utf8_bin NOT NULL, + `app_name` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT 'app_name', + `content` longtext COLLATE utf8_bin NOT NULL, + `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL, + `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00', + `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00', + `src_user` text COLLATE utf8_bin, + `src_ip` varchar(20) COLLATE utf8_bin DEFAULT NULL, + `op_type` char(10) COLLATE utf8_bin DEFAULT NULL, + `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT '租户字段', + PRIMARY KEY (`nid`), + KEY `idx_gmt_create` (`gmt_create`), + KEY `idx_gmt_modified` (`gmt_modified`), + KEY `idx_did` (`data_id`) +) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造'; + +-- ---------------------------- +-- Records of `his_config_info` +-- ---------------------------- +BEGIN; +INSERT INTO `his_config_info` VALUES ('0', '1', 'application-dev.yml', 'DEFAULT_GROUP', '', '# 加解密根密码\njasypt:\n encryptor:\n password: pigx #根密码\n# redis 相关\nspring:\n redis:\n password:\n host: ${REDIS-HOST:pigx-redis}\n # zipkin\n zipkin:\n enabled: true\n base-url: http://${ZIPKIN-HOST:pigx-zipkin}\n sleuth:\n web:\n client:\n enabled: true\n sampler:\n # 默认的采样比率为0.1,不能看到所有请求数据\n # 更改采样比率为1,就能看到所有的请求数据了,但是这样会增加接口调用延迟\n probability: 1.0\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n\n# feign 配置\nfeign:\n hystrix:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n# hystrix If you need to use ThreadLocal bound variables in your RequestInterceptor`s\n# you will need to either set the thread isolation strategy for Hystrix to `SEMAPHORE or disable Hystrix in Feign.\nhystrix:\n command:\n default:\n execution:\n isolation:\n strategy: SEMAPHORE\n thread:\n timeoutInMilliseconds: 60000\n shareSecurityContext: true\n\n#请求处理的超时时间\nribbon:\n ReadTimeout: 10000\n ConnectTimeout: 10000\n\n# mybaits-plus配置\nmybatis-plus:\n # MyBatis Mapper所对应的XML文件位置\n mapper-locations: classpath:/mapper/*Mapper.xml\n global-config:\n # 关闭MP3.0自带的banner\n banner: false\n db-config:\n # 主键类型\n id-type: auto\n\n#swagger公共信息\nswagger:\n host: ${GATEWAY-HOST:pigx-gateway}:${GATEWAY-PORT:9999}\n title: PigX Swagger API\n description: 全宇宙最牛逼的Spring Cloud微服务开发脚手架\n version: @project.version@\n license: Powered By PigX\n licenseUrl: https://pig4cloud.com/\n terms-of-service-url: https://pig4cloud.com/\n contact:\n name: 冷冷\n email: wangiegie@gmail.com\n url: https://pig4cloud.com/about.html\n authorization:\n name: pigX OAuth\n auth-regex: ^.*$\n authorization-scope-list:\n - scope: server\n description: server all\n token-url-list:\n - http://${GATEWAY-HOST:pigx-gateway}:${GATEWAY-PORT:9999}/auth/oauth/token\n\n## spring security 配置\nsecurity:\n oauth2:\n client:\n # 默认放行url,如果子模块重写这里的配置就会被覆盖\n ignore-urls:\n - /actuator/**\n - /v2/api-docs\n resource:\n loadBalanced: true\n token-info-uri: http://${AUTH-HOST:pigx-auth}/oauth/check_token', 'f683a54f4a1f950c356c1863dfb0917a', '2010-05-05 00:00:00', '2019-04-18 02:10:20', null, '127.0.0.1', 'I', ''), ('0', '2', 'pigx-activiti-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n ignore-urls:\n - \'/actuator/**\'\n - \'/v2/api-docs\'\n - \'/editor-app/**\'\n - \'/modeler.html\'\n - \'/ws/**\'\nspring:\n autoconfigure:\n exclude: org.activiti.spring.boot.SecurityAutoConfiguration\n activiti:\n check-process-definitions: false\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_ac}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - oa_leave_bill', '9ba263596903db9dba9c812a06ebd3b3', '2010-05-05 00:00:00', '2019-04-18 02:10:56', null, '127.0.0.1', 'I', ''), ('0', '3', 'pigx-auth-dev.yml', 'DEFAULT_GROUP', '', '# 数据源\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n freemarker:\n allow-request-override: false\n allow-session-override: false\n cache: true\n charset: UTF-8\n check-template-location: true\n content-type: text/html\n enabled: true\n expose-request-attributes: false\n expose-session-attributes: false\n expose-spring-macro-helpers: true\n prefer-file-system-access: true\n suffix: .ftl\n template-loader-path: classpath:/templates/', '2a84033a4e652efaa427b1869f276cea', '2010-05-05 00:00:00', '2019-04-18 02:11:32', null, '127.0.0.1', 'I', ''), ('0', '4', 'pigx-codegen-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\npigx:\n tenant:\n column: tenant_id\n tables:\n - sys_datasource_conf', '822e94558a8c507bf73d6843ae5ca7ad', '2010-05-05 00:00:00', '2019-04-18 02:12:10', null, '127.0.0.1', 'I', ''), ('0', '5', 'pigx-daemon-elastic-job-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n## 定时任务\nspring:\n # 保存定时任务的数据源\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n elasticjob:\n # 分布式任务协调依赖zookeeper\n zookeeper:\n server-lists: ${ZOOKEEPER-HOST:pigx-zookeeper}:${ZOOKEEPER-PORT:2181}\n namespace: pigx-daemon\n # 普通任务\n simples:\n spring-simple-job:\n job-class: com.pig4cloud.pigx.daemon.elastic.job.PigxSimpleJob\n cron: 0 0 0/1 * * ?\n sharding-total-count: 3\n sharding-item-parameters: 0=service1,1=service2,2=service3\n eventTraceRdbDataSource: \'dataSource\'\n listener:\n listener-class: com.pig4cloud.pigx.daemon.elastic.listener.PigxElasticJobListener\n spring-simple-job2:\n job-class: com.pig4cloud.pigx.daemon.elastic.job.PigxSimpleJob2\n cron: 0 0 0/1 * * ?\n sharding-total-count: 3\n sharding-item-parameters: 0=service1,1=service2,2=service3\n eventTraceRdbDataSource: \'dataSource\'\n listener:\n listener-class: com.pig4cloud.pigx.daemon.elastic.listener.PigxElasticJobListener\n # 简单任务\n dataflows:\n spring-dataflow-job:\n job-class: com.pig4cloud.pigx.daemon.elastic.job.PigxDataflowJob\n cron: 0 0 0/1 * * ?\n sharding-total-count: 3\n sharding-item-parameters: 0=service1,1=service2,2=service3\n streaming-process: true\n eventTraceRdbDataSource: \'dataSource\'\n listener:\n distributed-listener-class: com.pig4cloud.pigx.daemon.elastic.listener.PigxDistributeElasticJobListener\n started-timeout-milliseconds: 5000\n completed-timeout-milliseconds: 10000', 'e491142fc720dea9e8acb67d3b89f017', '2010-05-05 00:00:00', '2019-04-18 02:12:57', null, '127.0.0.1', 'I', ''), ('0', '6', ' pigx-daemon-quartz-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n resources:\n static-locations: classpath:/static/,classpath:/views/\n quartz:\n #相关属性配置\n properties:\n org:\n quartz:\n scheduler:\n instanceName: clusteredScheduler\n instanceId: AUTO\n jobStore:\n class: org.quartz.impl.jdbcjobstore.JobStoreTX\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n clusterCheckinInterval: 10000\n useProperties: false\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 50\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n #数据库方式\n job-store-type: jdbc\n #初始化表结构\n #jdbc:\n #initialize-schema: never\n\n', '30d64fb3f5f60ee25558d42bc3d3210e', '2010-05-05 00:00:00', '2019-04-18 02:13:26', null, '127.0.0.1', 'I', ''), ('0', '7', 'pigx-gateway-dev.yml', 'DEFAULT_GROUP', '', 'security:\n encode:\n # 前端密码密钥,必须16位\n key: \'pigxpigxpigxpigx\'\n\n# 不校验验证码终端\nignore:\n clients:\n - test\n swagger-providers:\n - ${AUTH-HOST:pigx-auth}\n - ${TX-MGR-HOST:pigx-tx-manager}', '4a1833d875a5e008837cf36f5c0f4c41', '2010-05-05 00:00:00', '2019-04-18 02:13:52', null, '127.0.0.1', 'I', ''), ('0', '8', 'pigx-monitor-dev.yml', 'DEFAULT_GROUP', '', 'spring:\n # 安全配置\n security:\n user:\n name: ENC(rZHA4LW5hHmhLAAzJoFNag==) # pigx\n password: ENC(bjeyh+Aeii3kHXkoo00ZUw==) # pigx\n boot:\n admin:\n ui:\n resource-locations: \'classpath:/ui/,classpath:/static/\'\n template-location: \'classpath:/ui/\'\n title: \'pigx 服务状态监控\'\n brand: \'pigx 服务状态监控\'', 'd4caef8a7cad3d357ad2fcb9f57e9982', '2010-05-05 00:00:00', '2019-04-18 02:14:17', null, '127.0.0.1', 'I', ''), ('0', '9', ' pigx-mp-manager-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_mp}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n hikari:\n connection-init-sql: SET NAMES utf8mb4\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - wx_menu\n - wx_account\n - wx_account_fans\n - wx_fans_msg_res', '4c1b373da87269fec9059221002618de', '2010-05-05 00:00:00', '2019-04-18 02:14:52', null, '127.0.0.1', 'I', ''), ('0', '10', ' pigx-tx-manager-dev.yml', 'DEFAULT_GROUP', '', '# 页面配置\nspring:\n mvc:\n static-path-pattern: /**\n resources:\n static-locations: classpath:/static/\n\n\n# LCN 配置\ntm:\n transaction:\n netty:\n delaytime: 5 # 客户端链接最大通讯时间 (秒)\n hearttime: 15 # 客户端心跳时间 (秒)\n redis:\n savemaxtime: 30 # redis 保存时间 (秒)\n socket:\n port: 9998 # 通讯端口\n maxconnection: 1000 #最大链接数\n compensate:\n auto: false #是否自动补偿\n notifyUrl: http://ip:port/path #补偿结果通知(配消息总线里面)\n tryTime: 30 # z再次重试时间间隔\n maxWaitTime: 5000 # 请求超时的最大时间 (毫秒)', '885f5c125f2df7a08692929ccce154be', '2010-05-05 00:00:00', '2019-04-18 02:15:21', null, '127.0.0.1', 'I', ''), ('0', '11', ' pigx-upms-biz-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n client-secret: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n scope: server\n\n# 数据源\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true\n\n# 文件系统 (提供测试环境,不要乱传)\nminio:\n url: https://minio.pig4cloud.com\n access-key: ENC(O4GgJmcJLQAnvfz+RRq65aps5HgbWQXZ)\n secret-key: ENC(O4GgJmcJLQAnvfz+RRq65aps5HgbWQXZ)\n\n# Logger Config\nlogging:\n level:\n com.pig4cloud.pigx.admin.mapper: debug\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - sys_user\n - sys_role\n - sys_dept\n - sys_log\n - sys_social_details\n - sys_dict\n - sys_dict_item\n - sys_log', 'd07edae79e0f4b991d5b3bdf594523dd', '2010-05-05 00:00:00', '2019-04-18 02:16:23', null, '127.0.0.1', 'I', ''), ('0', '12', 'pigx-zipkin-dev.yml', 'DEFAULT_GROUP', '', 'spring:\n # 数据源\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_zipkin}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\nmanagement:\n metrics:\n web:\n server:\n auto-time-requests: false\nzipkin:\n storage:\n type: mysql\nsleuth:\n enabled: true', 'd8390c0b219b97d5cad2776c651be9bd', '2010-05-05 00:00:00', '2019-04-18 02:16:50', null, '127.0.0.1', 'I', ''), ('1', '13', 'application-dev.yml', 'DEFAULT_GROUP', '', '# 加解密根密码\njasypt:\n encryptor:\n password: pigx #根密码\n# redis 相关\nspring:\n redis:\n password:\n host: ${REDIS-HOST:pigx-redis}\n # zipkin\n zipkin:\n enabled: true\n base-url: http://${ZIPKIN-HOST:pigx-zipkin}\n sleuth:\n web:\n client:\n enabled: true\n sampler:\n # 默认的采样比率为0.1,不能看到所有请求数据\n # 更改采样比率为1,就能看到所有的请求数据了,但是这样会增加接口调用延迟\n probability: 1.0\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n\n# feign 配置\nfeign:\n hystrix:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n# hystrix If you need to use ThreadLocal bound variables in your RequestInterceptor`s\n# you will need to either set the thread isolation strategy for Hystrix to `SEMAPHORE or disable Hystrix in Feign.\nhystrix:\n command:\n default:\n execution:\n isolation:\n strategy: SEMAPHORE\n thread:\n timeoutInMilliseconds: 60000\n shareSecurityContext: true\n\n#请求处理的超时时间\nribbon:\n ReadTimeout: 10000\n ConnectTimeout: 10000\n\n# mybaits-plus配置\nmybatis-plus:\n # MyBatis Mapper所对应的XML文件位置\n mapper-locations: classpath:/mapper/*Mapper.xml\n global-config:\n # 关闭MP3.0自带的banner\n banner: false\n db-config:\n # 主键类型\n id-type: auto\n\n#swagger公共信息\nswagger:\n host: ${GATEWAY-HOST:pigx-gateway}:${GATEWAY-PORT:9999}\n title: PigX Swagger API\n description: 全宇宙最牛逼的Spring Cloud微服务开发脚手架\n version: @project.version@\n license: Powered By PigX\n licenseUrl: https://pig4cloud.com/\n terms-of-service-url: https://pig4cloud.com/\n contact:\n name: 冷冷\n email: wangiegie@gmail.com\n url: https://pig4cloud.com/about.html\n authorization:\n name: pigX OAuth\n auth-regex: ^.*$\n authorization-scope-list:\n - scope: server\n description: server all\n token-url-list:\n - http://${GATEWAY-HOST:pigx-gateway}:${GATEWAY-PORT:9999}/auth/oauth/token\n\n## spring security 配置\nsecurity:\n oauth2:\n client:\n # 默认放行url,如果子模块重写这里的配置就会被覆盖\n ignore-urls:\n - /actuator/**\n - /v2/api-docs\n resource:\n loadBalanced: true\n token-info-uri: http://${AUTH-HOST:pigx-auth}/oauth/check_token', 'f683a54f4a1f950c356c1863dfb0917a', '2010-05-05 00:00:00', '2019-04-18 02:24:13', null, '127.0.0.1', 'U', ''), ('11', '14', ' pigx-upms-biz-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n client-secret: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n scope: server\n\n# 数据源\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true\n\n# 文件系统 (提供测试环境,不要乱传)\nminio:\n url: https://minio.pig4cloud.com\n access-key: ENC(O4GgJmcJLQAnvfz+RRq65aps5HgbWQXZ)\n secret-key: ENC(O4GgJmcJLQAnvfz+RRq65aps5HgbWQXZ)\n\n# Logger Config\nlogging:\n level:\n com.pig4cloud.pigx.admin.mapper: debug\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - sys_user\n - sys_role\n - sys_dept\n - sys_log\n - sys_social_details\n - sys_dict\n - sys_dict_item\n - sys_log', 'd07edae79e0f4b991d5b3bdf594523dd', '2010-05-05 00:00:00', '2019-04-18 02:32:09', null, '127.0.0.1', 'D', ''), ('0', '15', 'pigx-upms-biz-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n client-secret: ENC(ltJPpR50wT0oIY9kfOe1Iw==)\n scope: server\n\n# 数据源\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true\n\n# 文件系统 (提供测试环境,不要乱传)\nminio:\n url: https://minio.pig4cloud.com\n access-key: ENC(O4GgJmcJLQAnvfz+RRq65aps5HgbWQXZ)\n secret-key: ENC(O4GgJmcJLQAnvfz+RRq65aps5HgbWQXZ)\n\n# Logger Config\nlogging:\n level:\n com.pig4cloud.pigx.admin.mapper: debug\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - sys_user\n - sys_role\n - sys_dept\n - sys_log\n - sys_social_details\n - sys_dict\n - sys_dict_item\n - sys_log', 'd07edae79e0f4b991d5b3bdf594523dd', '2010-05-05 00:00:00', '2019-04-18 02:32:44', null, '127.0.0.1', 'I', ''), ('10', '16', ' pigx-tx-manager-dev.yml', 'DEFAULT_GROUP', '', '# 页面配置\nspring:\n mvc:\n static-path-pattern: /**\n resources:\n static-locations: classpath:/static/\n\n\n# LCN 配置\ntm:\n transaction:\n netty:\n delaytime: 5 # 客户端链接最大通讯时间 (秒)\n hearttime: 15 # 客户端心跳时间 (秒)\n redis:\n savemaxtime: 30 # redis 保存时间 (秒)\n socket:\n port: 9998 # 通讯端口\n maxconnection: 1000 #最大链接数\n compensate:\n auto: false #是否自动补偿\n notifyUrl: http://ip:port/path #补偿结果通知(配消息总线里面)\n tryTime: 30 # z再次重试时间间隔\n maxWaitTime: 5000 # 请求超时的最大时间 (毫秒)', '885f5c125f2df7a08692929ccce154be', '2010-05-05 00:00:00', '2019-04-18 02:53:33', null, '127.0.0.1', 'D', ''), ('0', '17', 'pigx-tx-manager-dev.yml', 'DEFAULT_GROUP', '', '# 页面配置\nspring:\n mvc:\n static-path-pattern: /**\n resources:\n static-locations: classpath:/static/\n\n\n# LCN 配置\ntm:\n transaction:\n netty:\n delaytime: 5 # 客户端链接最大通讯时间 (秒)\n hearttime: 15 # 客户端心跳时间 (秒)\n redis:\n savemaxtime: 30 # redis 保存时间 (秒)\n socket:\n port: 9998 # 通讯端口\n maxconnection: 1000 #最大链接数\n compensate:\n auto: false #是否自动补偿\n notifyUrl: http://ip:port/path #补偿结果通知(配消息总线里面)\n tryTime: 30 # z再次重试时间间隔\n maxWaitTime: 5000 # 请求超时的最大时间 (毫秒)', '885f5c125f2df7a08692929ccce154be', '2010-05-05 00:00:00', '2019-04-18 02:54:03', null, '127.0.0.1', 'I', ''), ('9', '18', ' pigx-mp-manager-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_mp}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n hikari:\n connection-init-sql: SET NAMES utf8mb4\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - wx_menu\n - wx_account\n - wx_account_fans\n - wx_fans_msg_res', '4c1b373da87269fec9059221002618de', '2010-05-05 00:00:00', '2019-04-18 02:56:43', null, '127.0.0.1', 'D', ''), ('0', '19', 'pigx-mp-manageer-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_mp}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n hikari:\n connection-init-sql: SET NAMES utf8mb4\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - wx_menu\n - wx_account\n - wx_account_fans\n - wx_fans_msg_res', '4c1b373da87269fec9059221002618de', '2010-05-05 00:00:00', '2019-04-18 02:57:23', null, '127.0.0.1', 'I', ''), ('0', '20', 'pigx-mp-manager-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_mp}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n hikari:\n connection-init-sql: SET NAMES utf8mb4\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - wx_menu\n - wx_account\n - wx_account_fans\n - wx_fans_msg_res', '4c1b373da87269fec9059221002618de', '2010-05-05 00:00:00', '2019-04-18 03:00:10', null, '127.0.0.1', 'I', ''), ('16', '21', 'pigx-mp-manageer-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n client-secret: ENC(gPFcUOmJm8WqM3k3eSqS0Q==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_mp}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n hikari:\n connection-init-sql: SET NAMES utf8mb4\n resources:\n static-locations: classpath:/static/,classpath:/views/\n\n\n# 租户表维护\npigx:\n tenant:\n column: tenant_id\n tables:\n - wx_menu\n - wx_account\n - wx_account_fans\n - wx_fans_msg_res', '4c1b373da87269fec9059221002618de', '2010-05-05 00:00:00', '2019-04-18 03:00:21', null, '127.0.0.1', 'D', ''), ('6', '22', ' pigx-daemon-quartz-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n resources:\n static-locations: classpath:/static/,classpath:/views/\n quartz:\n #相关属性配置\n properties:\n org:\n quartz:\n scheduler:\n instanceName: clusteredScheduler\n instanceId: AUTO\n jobStore:\n class: org.quartz.impl.jdbcjobstore.JobStoreTX\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n clusterCheckinInterval: 10000\n useProperties: false\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 50\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n #数据库方式\n job-store-type: jdbc\n #初始化表结构\n #jdbc:\n #initialize-schema: never\n\n', '30d64fb3f5f60ee25558d42bc3d3210e', '2010-05-05 00:00:00', '2019-04-18 03:08:09', null, '127.0.0.1', 'D', ''), ('0', '23', 'pigx-daemon-quartz-dev.yml', 'DEFAULT_GROUP', '', '## spring security 配置\nsecurity:\n oauth2:\n client:\n client-id: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n client-secret: ENC(tz2NM4GcmnE7sNJTYL8ZSg==)\n scope: server\n\n# 数据源配置\nspring:\n datasource:\n type: com.zaxxer.hikari.HikariDataSource\n driver-class-name: com.mysql.cj.jdbc.Driver\n username: ${MYSQL-USER:root}\n password: ${MYSQL-PWD:root}\n url: jdbc:mysql://${MYSQL-HOST:pigx-mysql}:${MYSQL-PORT:3306}/${MYSQL-DB:pigxx_job}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8\n resources:\n static-locations: classpath:/static/,classpath:/views/\n quartz:\n #相关属性配置\n properties:\n org:\n quartz:\n scheduler:\n instanceName: clusteredScheduler\n instanceId: AUTO\n jobStore:\n class: org.quartz.impl.jdbcjobstore.JobStoreTX\n driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate\n tablePrefix: QRTZ_\n isClustered: true\n clusterCheckinInterval: 10000\n useProperties: false\n threadPool:\n class: org.quartz.simpl.SimpleThreadPool\n threadCount: 50\n threadPriority: 5\n threadsInheritContextClassLoaderOfInitializingThread: true\n #数据库方式\n job-store-type: jdbc\n #初始化表结构\n #jdbc:\n #initialize-schema: never\n\n', '30d64fb3f5f60ee25558d42bc3d3210e', '2010-05-05 00:00:00', '2019-04-18 03:08:34', null, '127.0.0.1', 'I', ''); +COMMIT; + +-- ---------------------------- +-- Table structure for `roles` +-- ---------------------------- +DROP TABLE IF EXISTS `roles`; +CREATE TABLE `roles` ( + `username` varchar(50) NOT NULL, + `role` varchar(50) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- ---------------------------- +-- Table structure for `tenant_capacity` +-- ---------------------------- +DROP TABLE IF EXISTS `tenant_capacity`; +CREATE TABLE `tenant_capacity` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', + `tenant_id` varchar(128) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Tenant ID', + `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值', + `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量', + `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值', + `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数', + `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值', + `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量', + `gmt_create` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '创建时间', + `gmt_modified` datetime NOT NULL DEFAULT '2010-05-05 00:00:00' COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_tenant_id` (`tenant_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表'; + +-- ---------------------------- +-- Table structure for `tenant_info` +-- ---------------------------- +DROP TABLE IF EXISTS `tenant_info`; +CREATE TABLE `tenant_info` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', + `kp` varchar(128) COLLATE utf8_bin NOT NULL COMMENT 'kp', + `tenant_id` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_id', + `tenant_name` varchar(128) COLLATE utf8_bin DEFAULT '' COMMENT 'tenant_name', + `tenant_desc` varchar(256) COLLATE utf8_bin DEFAULT NULL COMMENT 'tenant_desc', + `create_source` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'create_source', + `gmt_create` bigint(20) NOT NULL COMMENT '创建时间', + `gmt_modified` bigint(20) NOT NULL COMMENT '修改时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`), + KEY `idx_tenant_id` (`tenant_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info'; + +-- ---------------------------- +-- Table structure for `users` +-- ---------------------------- +DROP TABLE IF EXISTS `users`; +CREATE TABLE `users` ( + `username` varchar(50) NOT NULL, + `password` varchar(500) NOT NULL, + `enabled` tinyint(1) NOT NULL, + PRIMARY KEY (`username`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- ---------------------------- +-- Records of `users` +-- ---------------------------- +BEGIN; +INSERT INTO `users` VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', '1'); +COMMIT; + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/db/Dockerfile b/db/Dockerfile index 9047aa555..18bb6e816 100644 --- a/db/Dockerfile +++ b/db/Dockerfile @@ -14,4 +14,6 @@ COPY ./db/4pigxx_zipkin.sql /docker-entrypoint-initdb.d COPY ./db/5pigxx_job.sql /docker-entrypoint-initdb.d -COPY ./db/6pigxx_mp.sql /docker-entrypoint-initdb.d \ No newline at end of file +COPY ./db/6pigxx_mp.sql /docker-entrypoint-initdb.d + +COPY ./db/7pigxx_config.sql /docker-entrypoint-initdb.d \ No newline at end of file diff --git a/pigx-config/conf/schema.sql b/pigx-config/conf/schema.sql deleted file mode 100644 index fd95b3e9f..000000000 --- a/pigx-config/conf/schema.sql +++ /dev/null @@ -1,188 +0,0 @@ -CREATE SCHEMA nacos AUTHORIZATION nacos; - -CREATE TABLE config_info ( - id bigint NOT NULL generated by default as identity, - data_id varchar(255) NOT NULL, - group_id varchar(128) NOT NULL, - tenant_id varchar(128) default '', - app_name varchar(128), - content CLOB, - md5 varchar(32) DEFAULT NULL, - gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', - gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', - src_user varchar(128) DEFAULT NULL, - src_ip varchar(20) DEFAULT NULL, - c_desc varchar(256) DEFAULT NULL, - c_use varchar(64) DEFAULT NULL, - effect varchar(64) DEFAULT NULL, - type varchar(64) DEFAULT NULL, - c_schema LONG VARCHAR DEFAULT NULL, - constraint configinfo_id_key PRIMARY KEY (id), - constraint uk_configinfo_datagrouptenant UNIQUE (data_id,group_id,tenant_id)); - -CREATE INDEX configinfo_dataid_key_idx ON config_info(data_id); -CREATE INDEX configinfo_groupid_key_idx ON config_info(group_id); -CREATE INDEX configinfo_dataid_group_key_idx ON config_info(data_id, group_id); - -CREATE TABLE his_config_info ( - id bigint NOT NULL, - nid bigint NOT NULL generated by default as identity, - data_id varchar(255) NOT NULL, - group_id varchar(128) NOT NULL, - tenant_id varchar(128) default '', - app_name varchar(128), - content CLOB, - md5 varchar(32) DEFAULT NULL, - gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000', - gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00.000', - src_user varchar(128), - src_ip varchar(20) DEFAULT NULL, - op_type char(10) DEFAULT NULL, - constraint hisconfiginfo_nid_key PRIMARY KEY (nid)); - -CREATE INDEX hisconfiginfo_dataid_key_idx ON his_config_info(data_id); -CREATE INDEX hisconfiginfo_gmt_create_idx ON his_config_info(gmt_create); -CREATE INDEX hisconfiginfo_gmt_modified_idx ON his_config_info(gmt_modified); - - -CREATE TABLE config_info_beta ( - id bigint NOT NULL generated by default as identity, - data_id varchar(255) NOT NULL, - group_id varchar(128) NOT NULL, - tenant_id varchar(128) default '', - app_name varchar(128), - content CLOB, - beta_ips varchar(1024), - md5 varchar(32) DEFAULT NULL, - gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', - gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', - src_user varchar(128), - src_ip varchar(20) DEFAULT NULL, - constraint configinfobeta_id_key PRIMARY KEY (id), - constraint uk_configinfobeta_datagrouptenant UNIQUE (data_id,group_id,tenant_id)); - -CREATE TABLE config_info_tag ( - id bigint NOT NULL generated by default as identity, - data_id varchar(255) NOT NULL, - group_id varchar(128) NOT NULL, - tenant_id varchar(128) default '', - tag_id varchar(128) NOT NULL, - app_name varchar(128), - content CLOB, - md5 varchar(32) DEFAULT NULL, - gmt_create timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', - gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', - src_user varchar(128), - src_ip varchar(20) DEFAULT NULL, - constraint configinfotag_id_key PRIMARY KEY (id), - constraint uk_configinfotag_datagrouptenanttag UNIQUE (data_id,group_id,tenant_id,tag_id)); - -CREATE TABLE config_info_aggr ( - id bigint NOT NULL generated by default as identity, - data_id varchar(255) NOT NULL, - group_id varchar(128) NOT NULL, - tenant_id varchar(128) default '', - datum_id varchar(255) NOT NULL, - app_name varchar(128), - content CLOB, - gmt_modified timestamp NOT NULL DEFAULT '2010-05-05 00:00:00', - constraint configinfoaggr_id_key PRIMARY KEY (id), - constraint uk_configinfoaggr_datagrouptenantdatum UNIQUE (data_id,group_id,tenant_id,datum_id)); - -CREATE TABLE app_list ( - id bigint NOT NULL generated by default as identity, - app_name varchar(128) NOT NULL, - is_dynamic_collect_disabled smallint DEFAULT 0, - last_sub_info_collected_time timestamp DEFAULT '1970-01-01 08:00:00.0', - sub_info_lock_owner varchar(128), - sub_info_lock_time timestamp DEFAULT '1970-01-01 08:00:00.0', - constraint applist_id_key PRIMARY KEY (id), - constraint uk_appname UNIQUE (app_name)); - -CREATE TABLE app_configdata_relation_subs ( - id bigint NOT NULL generated by default as identity, - app_name varchar(128) NOT NULL, - data_id varchar(255) NOT NULL, - group_id varchar(128) NOT NULL, - gmt_modified timestamp DEFAULT '2010-05-05 00:00:00', - constraint configdatarelationsubs_id_key PRIMARY KEY (id), - constraint uk_app_sub_config_datagroup UNIQUE (app_name, data_id, group_id)); - - -CREATE TABLE app_configdata_relation_pubs ( - id bigint NOT NULL generated by default as identity, - app_name varchar(128) NOT NULL, - data_id varchar(255) NOT NULL, - group_id varchar(128) NOT NULL, - gmt_modified timestamp DEFAULT '2010-05-05 00:00:00', - constraint configdatarelationpubs_id_key PRIMARY KEY (id), - constraint uk_app_pub_config_datagroup UNIQUE (app_name, data_id, group_id)); - -CREATE TABLE config_tags_relation ( - id bigint NOT NULL, - tag_name varchar(128) NOT NULL, - tag_type varchar(64) DEFAULT NULL, - data_id varchar(255) NOT NULL, - group_id varchar(128) NOT NULL, - tenant_id varchar(128) DEFAULT '', - nid bigint NOT NULL generated by default as identity, - constraint config_tags_id_key PRIMARY KEY (nid), - constraint uk_configtagrelation_configidtag UNIQUE (id, tag_name, tag_type)); - -CREATE INDEX config_tags_tenant_id_idx ON config_tags_relation(tenant_id); - -CREATE TABLE group_capacity ( - id bigint NOT NULL generated by default as identity, - group_id varchar(128) DEFAULT '', - quota int DEFAULT 0, - usage int DEFAULT 0, - max_size int DEFAULT 0, - max_aggr_count int DEFAULT 0, - max_aggr_size int DEFAULT 0, - max_history_count int DEFAULT 0, - gmt_create timestamp DEFAULT '2010-05-05 00:00:00', - gmt_modified timestamp DEFAULT '2010-05-05 00:00:00', - constraint group_capacity_id_key PRIMARY KEY (id), - constraint uk_group_id UNIQUE (group_id)); - -CREATE TABLE tenant_capacity ( - id bigint NOT NULL generated by default as identity, - tenant_id varchar(128) DEFAULT '', - quota int DEFAULT 0, - usage int DEFAULT 0, - max_size int DEFAULT 0, - max_aggr_count int DEFAULT 0, - max_aggr_size int DEFAULT 0, - max_history_count int DEFAULT 0, - gmt_create timestamp DEFAULT '2010-05-05 00:00:00', - gmt_modified timestamp DEFAULT '2010-05-05 00:00:00', - constraint tenant_capacity_id_key PRIMARY KEY (id), - constraint uk_tenant_id UNIQUE (tenant_id)); - -CREATE TABLE tenant_info ( - id bigint NOT NULL generated by default as identity, - kp varchar(128) NOT NULL, - tenant_id varchar(128) DEFAULT '', - tenant_name varchar(128) DEFAULT '', - tenant_desc varchar(256) DEFAULT NULL, - create_source varchar(32) DEFAULT NULL, - gmt_create bigint NOT NULL, - gmt_modified bigint NOT NULL, - constraint tenant_info_id_key PRIMARY KEY (id), - constraint uk_tenant_info_kptenantid UNIQUE (kp,tenant_id)); -CREATE INDEX tenant_info_tenant_id_idx ON tenant_info(tenant_id); - -CREATE TABLE users ( - username varchar(50) NOT NULL PRIMARY KEY, - password varchar(500) NOT NULL, - enabled boolean NOT NULL -); - -CREATE TABLE roles ( - username varchar(50) NOT NULL, - role varchar(50) NOT NULL -); - -INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE); - -INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN'); diff --git a/pigx-register/src/main/java/com/alibaba/nacos/PigxNacosApplication.java b/pigx-register/src/main/java/com/alibaba/nacos/PigxNacosApplication.java index cb3c67779..95afbc383 100755 --- a/pigx-register/src/main/java/com/alibaba/nacos/PigxNacosApplication.java +++ b/pigx-register/src/main/java/com/alibaba/nacos/PigxNacosApplication.java @@ -32,10 +32,6 @@ import org.springframework.scheduling.annotation.EnableScheduling; public class PigxNacosApplication { public static void main(String[] args) { - System.setProperty(ConfigConstant.TOMCAT_DIR, "logs"); - System.setProperty(ConfigConstant.TOMCAT_ACCESS_LOG, "false"); - System.setProperty(ConfigConstant.NACOS_HOME, "pigx-config"); - System.setProperty(ConfigConstant.NACOS_LOGS_PATH, "logs/nacos"); System.setProperty(ConfigConstant.STANDALONE_MODE, "true"); SpringApplication.run(PigxNacosApplication.class, args); } diff --git a/pigx-register/src/main/java/com/alibaba/nacos/console/config/ConfigConstant.java b/pigx-register/src/main/java/com/alibaba/nacos/console/config/ConfigConstant.java index 75bc13cf2..448b6111f 100644 --- a/pigx-register/src/main/java/com/alibaba/nacos/console/config/ConfigConstant.java +++ b/pigx-register/src/main/java/com/alibaba/nacos/console/config/ConfigConstant.java @@ -3,6 +3,8 @@ package com.alibaba.nacos.console.config; /** * @author lengleng * @date 2019-04-19 + *
+ * 覆盖nacos 默认配置
*/
public interface ConfigConstant {
/**
@@ -25,6 +27,7 @@ public interface ConfigConstant {
*/
String NACOS_HOME = "nacos.home";
+
/**
* tomcat 目录
*/
diff --git a/pigx-register/src/main/resources/bootstrap.yml b/pigx-register/src/main/resources/bootstrap.yml
index 345134771..bdaffec9c 100755
--- a/pigx-register/src/main/resources/bootstrap.yml
+++ b/pigx-register/src/main/resources/bootstrap.yml
@@ -12,7 +12,7 @@ db:
user: root
password: root
url:
- 0: jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
+ 0: jdbc:mysql://127.0.0.1:3306/pigxx_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
# 关闭nacos 登录
spring:
diff --git a/pom.xml b/pom.xml
index 7f0e8cce2..46cfada82 100644
--- a/pom.xml
+++ b/pom.xml
@@ -169,7 +169,7 @@