feat: 修改包名

This commit is contained in:
taojinlong 2021-02-19 16:34:02 +08:00
parent 2bddae2e33
commit 41c53b451b
155 changed files with 195 additions and 173 deletions

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>fit2cloud-commons</artifactId>
<groupId>com.fit2cloud</groupId>
<version>1.0-SNAPSHOT</version>
<groupId>io.dataease</groupId>
<artifactId>dataease-commons</artifactId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fit2cloud-common-auth</artifactId>
<artifactId>dataease-common-auth</artifactId>
<dependencies>
<dependency>
@ -24,9 +24,9 @@
<version>${jwt.version}</version>
</dependency>
<dependency>
<groupId>com.fit2cloud</groupId>
<artifactId>fit2cloud-common-db</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>io.dataease</groupId>
<artifactId>dataease-common-db</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
@ -45,6 +45,11 @@
<artifactId>ehcache-core</artifactId>
<version>${ehcache.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.15</version>
</dependency>
<!--下面是数据层mybatis配置-->
@ -53,4 +58,4 @@
</project>
</project>

View File

@ -1,14 +1,13 @@
package com.fit2cloud.commons.auth.api;
package io.dataease.commons.auth.api;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.asymmetric.RSA;
import com.fit2cloud.commons.auth.bean.LoginDto;
import com.fit2cloud.commons.auth.bean.UserBean;
import com.fit2cloud.commons.auth.bean.UserInfo;
import com.fit2cloud.commons.auth.config.RsaProperties;
import com.fit2cloud.commons.auth.service.UserService;
import com.fit2cloud.commons.auth.util.JWTUtil;
import com.fit2cloud.commons.auth.util.RsaUtil;
import io.dataease.commons.auth.bean.LoginDto;
import io.dataease.commons.auth.bean.UserBean;
import io.dataease.commons.auth.bean.UserInfo;
import io.dataease.commons.auth.config.RsaProperties;
import io.dataease.commons.auth.service.UserService;
import io.dataease.commons.auth.util.JWTUtil;
import io.dataease.commons.auth.util.RsaUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.RequestContextHolder;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.bean;
package io.dataease.commons.auth.bean;
import lombok.AllArgsConstructor;
import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.bean;
package io.dataease.commons.auth.bean;
import lombok.AllArgsConstructor;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.bean;
package io.dataease.commons.auth.bean;
import lombok.AllArgsConstructor;
import lombok.Builder;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.config;
package io.dataease.commons.auth.config;
import org.springframework.context.annotation.Bean;

View File

@ -1,8 +1,8 @@
package com.fit2cloud.commons.auth.config;
package io.dataease.commons.auth.config;
import com.fit2cloud.commons.auth.bean.UserBean;
import com.fit2cloud.commons.auth.service.UserService;
import com.fit2cloud.commons.auth.util.JWTUtil;
import io.dataease.commons.auth.bean.UserBean;
import io.dataease.commons.auth.service.UserService;
import io.dataease.commons.auth.util.JWTUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.shiro.authc.AuthenticationException;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.config;
package io.dataease.commons.auth.config;
import org.apache.shiro.authc.AuthenticationToken;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.config;
package io.dataease.commons.auth.config;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;

View File

@ -1,10 +1,9 @@
package com.fit2cloud.commons.auth.config;
package io.dataease.commons.auth.config;
import com.fit2cloud.commons.auth.filter.F2CLogoutFilter;
import com.fit2cloud.commons.auth.filter.F2CPermissionsFilter;
import com.fit2cloud.commons.auth.filter.F2CRolesFilter;
import com.fit2cloud.commons.auth.filter.JWTFilter;
import com.fit2cloud.commons.auth.service.ShiroService;
import io.dataease.commons.auth.filter.F2CLogoutFilter;
import io.dataease.commons.auth.filter.F2CPermissionsFilter;
import io.dataease.commons.auth.filter.JWTFilter;
import io.dataease.commons.auth.service.ShiroService;
import org.apache.shiro.mgt.DefaultSessionStorageEvaluator;
import org.apache.shiro.mgt.DefaultSubjectDAO;
import org.apache.shiro.spring.LifecycleBeanPostProcessor;

View File

@ -1,9 +1,9 @@
package com.fit2cloud.commons.auth.dao;
package io.dataease.commons.auth.dao;
import com.fit2cloud.commons.auth.bean.ExtPermissionBean;
import com.fit2cloud.commons.auth.entity.SysUser;
import io.dataease.commons.auth.bean.ExtPermissionBean;
import io.dataease.commons.auth.entity.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.entity;
package io.dataease.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.entity;
package io.dataease.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.entity;
package io.dataease.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.entity;
package io.dataease.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.entity;
package io.dataease.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.entity;
package io.dataease.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.entity;
package io.dataease.commons.auth.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.filter;
package io.dataease.commons.auth.filter;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.filter.authc.LogoutFilter;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.filter;
package io.dataease.commons.auth.filter;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.filter;
package io.dataease.commons.auth.filter;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.filter.authz.AuthorizationFilter;

View File

@ -1,7 +1,7 @@
package com.fit2cloud.commons.auth.filter;
package io.dataease.commons.auth.filter;
import com.fit2cloud.commons.auth.config.JWTToken;
import com.fit2cloud.commons.auth.util.JWTUtil;
import io.dataease.commons.auth.config.JWTToken;
import io.dataease.commons.auth.util.JWTUtil;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter;
import org.slf4j.Logger;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.filter;
package io.dataease.commons.auth.filter;
import cn.hutool.core.util.StrUtil;

View File

@ -1,6 +1,6 @@
package com.fit2cloud.commons.auth.mapper;
package io.dataease.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysDept;
import io.dataease.commons.auth.entity.SysDept;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,6 @@
package com.fit2cloud.commons.auth.mapper;
package io.dataease.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysDictDetail;
import io.dataease.commons.auth.entity.SysDictDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,6 @@
package com.fit2cloud.commons.auth.mapper;
package io.dataease.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysDict;
import io.dataease.commons.auth.entity.SysDict;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,6 @@
package com.fit2cloud.commons.auth.mapper;
package io.dataease.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysMenu;
import io.dataease.commons.auth.entity.SysMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,6 @@
package com.fit2cloud.commons.auth.mapper;
package io.dataease.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysRole;
import io.dataease.commons.auth.entity.SysRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,6 @@
package com.fit2cloud.commons.auth.mapper;
package io.dataease.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysUser;
import io.dataease.commons.auth.entity.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,6 @@
package com.fit2cloud.commons.auth.mapper;
package io.dataease.commons.auth.mapper;
import com.fit2cloud.commons.auth.entity.SysUsersRoles;
import io.dataease.commons.auth.entity.SysUsersRoles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.service;
package io.dataease.commons.auth.service;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;

View File

@ -1,13 +1,12 @@
package com.fit2cloud.commons.auth.service;
package io.dataease.commons.auth.service;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fit2cloud.commons.auth.bean.UserBean;
import com.fit2cloud.commons.auth.dao.ExtUserMapper;
import com.fit2cloud.commons.auth.entity.SysUser;
import com.fit2cloud.commons.auth.mapper.SysUserMapper;
import io.dataease.commons.auth.bean.UserBean;
import io.dataease.commons.auth.dao.ExtUserMapper;
import io.dataease.commons.auth.entity.SysUser;
import io.dataease.commons.auth.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

View File

@ -1,8 +1,8 @@
package com.fit2cloud.commons.auth.service.impl;
package io.dataease.commons.auth.service.impl;
import com.fit2cloud.commons.auth.bean.ExtPermissionBean;
import com.fit2cloud.commons.auth.dao.ExtUserMapper;
import com.fit2cloud.commons.auth.service.ShiroService;
import io.dataease.commons.auth.bean.ExtPermissionBean;
import io.dataease.commons.auth.dao.ExtUserMapper;
import io.dataease.commons.auth.service.ShiroService;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.auth.util;
package io.dataease.commons.auth.util;
import cn.hutool.core.util.ObjectUtil;

View File

@ -1,14 +1,12 @@
package com.fit2cloud.commons.auth.util;
package io.dataease.commons.auth.util;
import com.auth0.jwt.JWT;
import com.auth0.jwt.JWTVerifier;
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.exceptions.JWTDecodeException;
import com.auth0.jwt.interfaces.DecodedJWT;
import com.fit2cloud.commons.auth.dao.ExtUserMapper;
import com.fit2cloud.commons.auth.service.UserService;
import io.dataease.commons.auth.dao.ExtUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import java.util.Date;

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>fit2cloud-commons</artifactId>
<groupId>com.fit2cloud</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>dataease-commons</artifactId>
<groupId>io.dataease</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fit2cloud-common-base</artifactId>
<artifactId>dataease-common-base</artifactId>
</project>
</project>

View File

@ -1,7 +1,7 @@
package com.fit2cloud.commons.base;
package io.dataease.commons.base;
import cn.hutool.core.util.StrUtil;
import com.fit2cloud.commons.base.result.ResultEntity;
import io.dataease.commons.base.result.ResultEntity;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.error.ErrorAttributeOptions;
import org.springframework.boot.web.servlet.error.ErrorAttributes;

View File

@ -1,8 +1,8 @@
package com.fit2cloud.commons.base;
package io.dataease.commons.base;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import com.fit2cloud.commons.base.result.ResultEntity;
import io.dataease.commons.base.result.ResultEntity;
import org.springframework.core.MethodParameter;
import org.springframework.http.MediaType;
import org.springframework.http.converter.StringHttpMessageConverter;

View File

@ -1,6 +1,6 @@
package com.fit2cloud.commons.base.api;
package io.dataease.commons.base.api;
import com.fit2cloud.commons.base.result.ResultEntity;
import io.dataease.commons.base.result.ResultEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

View File

@ -1,6 +1,6 @@
package com.fit2cloud.commons.base.api;
package io.dataease.commons.base.api;
import com.fit2cloud.commons.base.result.ResultEntity;
import io.dataease.commons.base.result.ResultEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.commons.base.result;
package io.dataease.commons.base.result;
import lombok.AllArgsConstructor;
import lombok.Data;

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>fit2cloud-commons</artifactId>
<groupId>com.fit2cloud</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>dataease-commons</artifactId>
<groupId>io.dataease</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fit2cloud-common-db</artifactId>
<artifactId>dataease-common-db</artifactId>
<dependencies>
<dependency>
@ -61,4 +61,4 @@
</dependencies>
</project>
</project>

View File

@ -1,4 +1,4 @@
package com.fit2cloud.common.db;
package io.dataease.common.db;
import com.baomidou.mybatisplus.generator.AutoGenerator;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.common.db;
package io.dataease.common.db;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.common.db;
package io.dataease.common.db;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.common.db;
package io.dataease.common.db;
import com.github.pagehelper.Page;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.common.db;
package io.dataease.common.db;
import lombok.AllArgsConstructor;
import lombok.Data;

View File

@ -3,13 +3,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>fit2cloud-commons</artifactId>
<groupId>com.fit2cloud</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>dataease-commons</artifactId>
<groupId>io.dataease</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fit2cloud-common-logs</artifactId>
<artifactId>dataease-common-logs</artifactId>
</project>
</project>

View File

@ -3,20 +3,20 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>io.dataease</groupId>
<artifactId>dataease</artifactId>
<groupId>com.fit2cloud</groupId>
<version>1.0-SNAPSHOT</version>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fit2cloud-commons</artifactId>
<artifactId>dataease-commons</artifactId>
<packaging>pom</packaging>
<modules>
<module>fit2cloud-common-auth</module>
<module>fit2cloud-common-base</module>
<module>fit2cloud-common-logs</module>
<module>fit2cloud-common-db</module>
<module>dataease-common-logs</module>
<module>dataease-common-db</module>
<module>dataease-common-base</module>
<module>dataease-common-auth</module>
</modules>
</project>
</project>

View File

@ -4,32 +4,32 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>dataease</artifactId>
<groupId>com.fit2cloud</groupId>
<version>1.0-SNAPSHOT</version>
<groupId>io.dataease</groupId>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>fit2cloud-system</artifactId>
<artifactId>dataease-server</artifactId>
<dependencies>
<dependency>
<groupId>com.fit2cloud</groupId>
<artifactId>fit2cloud-common-base</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>io.dataease</groupId>
<artifactId>dataease-common-base</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.fit2cloud</groupId>
<artifactId>fit2cloud-common-auth</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>io.dataease</groupId>
<artifactId>dataease-common-auth</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.fit2cloud</groupId>
<artifactId>fit2cloud-common-db</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>io.dataease</groupId>
<artifactId>dataease-common-db</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
@ -41,10 +41,15 @@
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
</dependencies>
</project>
</project>

View File

@ -1,4 +1,4 @@
package com.fit2cloud;
package io.dataease;
import org.springframework.boot.SpringApplication;

View File

@ -1,18 +1,11 @@
package com.fit2cloud.system.api;
package io.dataease.system.api;
import com.fit2cloud.common.db.PageUtils;
import com.fit2cloud.common.db.Pager;
/*import com.fit2cloud.commons.auth.entity.User;
import com.fit2cloud.commons.auth.mapper.UserMapper;*/
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
public class BusiApi {

View File

@ -1,4 +1,4 @@
package com.fit2cloud.system.api;
package io.dataease.system.api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

View File

@ -1,4 +1,4 @@
package com.fit2cloud.system.api;
package io.dataease.system.api;

View File

@ -126,3 +126,17 @@ CREATE TABLE `sys_users_roles` (
PRIMARY KEY (`user_id`,`role_id`) USING BTREE,
KEY `FKq4eq273l04bpu4efj0jd0jb98` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户角色关联';
DROP TABLE IF EXISTS `datasource`;
CREATE TABLE `datasource` (
`id` varchar(50) NOT NULL COMMENT 'ID',
`name` varchar(255) NOT NULL COMMENT '名称',
`type` varchar(255) NOT NULL COMMENT '类型',
`configuration` longtext COMMENT '详细信息',
`description` varchar(255) DEFAULT NULL COMMENT '描述',
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='数据源链接';

View File

@ -0,0 +1,33 @@
package io.dataease;
import io.dataease.datasource.JdbcDataProvider;
import java.util.HashMap;
import java.util.Map;
public class MyTest {
public static void main(String[] args) throws Exception {
Map<String, String> dataSource = new HashMap<>();
dataSource.put("driver", "com.mysql.cj.jdbc.Driver");
dataSource.put("jdbc_url", "jdbc:mysql://localhost:3306/dataease?characterEncoding=utf8&useSSL=true");
dataSource.put("database", "dataease");
dataSource.put("user", "root");
dataSource.put("passwd", "jinlong");
dataSource.put("", "");
Map<String, String> query = new HashMap<>();
query.put("sql", "select table_name from information_schema.tables where table_schema='DATABASE';".replace("DATABASE", dataSource.get("database")));
// query.put("sql", "SELECT * FROM dataease.test_users;");
JdbcDataProvider jdbcDataProvider = new JdbcDataProvider();
jdbcDataProvider.setDataSource(dataSource);
jdbcDataProvider.setQuery(query);
// jdbcDataProvider.test();
// jdbcDataProvider.getData();
for (String showTable : jdbcDataProvider.showTables()) {
System.out.println(showTable);
}
}
}

View File

@ -1,23 +0,0 @@
package com.fit2cloud;
import com.fit2cloud.common.db.CodeGenerator;
import lombok.SneakyThrows;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class MyTest {
/*public static void main(String[] args) throws IOException {
ClassLoader classLoader = SystemApp.class.getClassLoader();
InputStream resourceAsStream = classLoader.getResourceAsStream("application.properties");
Properties properties = new Properties();
properties.load(resourceAsStream);
System.setProperties(properties);
CodeGenerator.test();
}*/
}

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

View File

Before

Width:  |  Height:  |  Size: 355 KiB

After

Width:  |  Height:  |  Size: 355 KiB

Some files were not shown because too many files have changed in this diff Show More