Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 17 additions & 31 deletions script/soul.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ MySQL - 5.5.56-MariaDB : Database - skyway
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;
Expand All @@ -18,53 +17,49 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/`soul` /*!40100 DEFAULT CHARACTER SET ut
USE `soul`;

/*Table structure for table `app_auth` */

DROP TABLE IF EXISTS `app_auth`;

CREATE TABLE `app_auth` (
`id` varchar(128) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`id` varchar(128) NOT NULL COMMENT '主键id',
`app_key` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用标识key',
`app_secret` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '加密算法secret',
`enabled` tinyint(4) NOT NULL COMMENT '是否删除',
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`date_updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Table structure for table `dashboard_user` */

DROP TABLE IF EXISTS `dashboard_user`;

CREATE TABLE `dashboard_user` (
`id` varchar(128) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`id` varchar(128) NOT NULL COMMENT '主键id',
`user_name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名',
`password` varchar(128) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户密码',
`role` int(4) NOT NULL COMMENT '角色',
`enabled` tinyint(4) NOT NULL COMMENT '是否删除',
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`date_updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Table structure for table `plugin` */

DROP TABLE IF EXISTS `plugin`;

CREATE TABLE `plugin` (
`id` varchar(128) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`id` varchar(128) NOT NULL COMMENT '主键id',
`name` varchar(62) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '插件名称',
`enable` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启(0,未开启,1开启)',
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`date_updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Table structure for table `rule` */

DROP TABLE IF EXISTS `rule`;

CREATE TABLE `rule` (
`id` varchar(128) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`id` varchar(128) NOT NULL COMMENT '主键id',
`selector_id` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '选择器id',
`match_mode` int(2) NOT NULL COMMENT '匹配方式(0 and 1 or)',
`name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '规则名称',
Expand All @@ -75,34 +70,32 @@ CREATE TABLE `rule` (
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`date_updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Table structure for table `rule_condition` */

DROP TABLE IF EXISTS `rule_condition`;

CREATE TABLE `rule_condition` (
`id` varchar(128) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`rule_id` bigint(10) NOT NULL COMMENT '规则id',
`id` varchar(128) NOT NULL COMMENT '主键id',
`rule_id` varchar(128) NOT NULL COMMENT '规则id',
`param_type` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数类型(post query uri等)',
`operator` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '匹配符(= > < like match)',
`param_name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数名称',
`param_value` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数值',
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`date_updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Table structure for table `selector` */

DROP TABLE IF EXISTS `selector`;

CREATE TABLE `selector` (
`id` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键id varchar',
`plugin_id` bigint(10) NOT NULL COMMENT '插件id',
`plugin_id` varchar(128) NOT NULL COMMENT '插件id',
`name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '选择器名称',
`match_mode` int(2) NOT NULL COMMENT '匹配方式(0 and 1 or)',
`type` tinyint(4) NOT NULL COMMENT '类型(0,全流量,1自定义流量)',
`type` int(4) NOT NULL COMMENT '类型(0,全流量,1自定义流量)',
`rank` int(4) NOT NULL COMMENT '排序',
`enabled` tinyint(4) NOT NULL COMMENT '是否开启',
`loged` tinyint(4) NOT NULL COMMENT '是否打印日志',
Expand All @@ -113,26 +106,21 @@ CREATE TABLE `selector` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*Table structure for table `selector_condition` */

DROP TABLE IF EXISTS `selector_condition`;

CREATE TABLE `selector_condition` (
`id` bigint(10) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`selector_id` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '选择器id',
`id` varchar(128) NOT NULL COMMENT '主键id',
`selector_id` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '选择器id',
`param_type` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数类型(post query uri等)',
`operator` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '匹配符(= > < like match)',
`param_name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数名称',
`param_value` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '参数值',
`date_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`date_updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

/*plugin*/

INSERT INTO `soul`.`plugin` (`id`, `name`, `enable`, `date_created`, `date_updated`) VALUES ('1', 'sign', '0', '2018-06-14 10:17:35', '2018-06-14 10:17:35');
INSERT INTO `soul`.`plugin` (`id`, `name`, `enable`, `date_created`, `date_updated`) VALUES ('2', 'waf', '0', '2018-06-23 10:26:30', '2018-06-13 15:43:10');
INSERT INTO `soul`.`plugin` (`id`, `name`, `enable`, `date_created`, `date_updated`) VALUES ('3', 'rewrite', '0', '2018-06-23 10:26:34', '2018-06-25 13:59:31');
Expand All @@ -141,7 +129,5 @@ INSERT INTO `soul`.`plugin` (`id`, `name`, `enable`, `date_created`, `date_updat
INSERT INTO `soul`.`plugin` (`id`, `name`, `enable`, `date_created`, `date_updated`) VALUES ('6', 'dubbo', '0', '2018-06-23 10:26:41', '2018-06-11 10:11:47');
INSERT INTO `soul`.`plugin` (`id`, `name`, `enable`, `date_created`, `date_updated`) VALUES ('7', 'monitor', '0', '2018-06-25 13:47:57', '2018-06-25 13:47:57');


/**user**/
INSERT INTO `soul`.`dashboard_user` (`id`, `user_name`, `password`, `role`, `enabled`, `date_created`, `date_updated`) VALUES ('1', 'admin', '123456', '1', '1', '2018-06-23 15:12:22', '2018-06-23 15:12:23');

INSERT INTO `soul`.`dashboard_user` (`id`, `user_name`, `password`, `role`, `enabled`, `date_created`, `date_updated`) VALUES ('1', 'admin', '123456', '1', '1', '2018-06-23 15:12:22', '2018-06-23 15:12:23');
17 changes: 10 additions & 7 deletions soul-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>soul-admin</artifactId>

<dependencies>

<dependency>
<groupId>org.dromara.soul</groupId>
<artifactId>soul-common</artifactId>
</dependency>

<dependency>
<groupId>org.dromara.soul</groupId>
<artifactId>soul-configuration</artifactId>
Expand All @@ -27,7 +25,6 @@
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>


<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
Expand All @@ -37,14 +34,17 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<dependency>
<groupId>org.projectreactor</groupId>
<artifactId>reactor-spring</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand All @@ -55,10 +55,12 @@
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</dependency>

<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
Expand All @@ -74,6 +76,7 @@
<artifactId>pagehelper</artifactId>
<version>5.1.1</version>
</dependency>

<dependency>
<groupId>com.101tec</groupId>
<artifactId>zkclient</artifactId>
Expand All @@ -93,10 +96,12 @@
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo-shaded</artifactId>
</dependency>

<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-core</artifactId>
</dependency>

<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-runtime</artifactId>
Expand All @@ -106,7 +111,7 @@
<groupId>com.caucho</groupId>
<artifactId>hessian</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->

<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
Expand Down Expand Up @@ -155,6 +160,4 @@
</plugin>
</plugins>
</build>


</project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/
@SpringBootApplication
@ComponentScan("org.dromara.soul")
@Import(value = { ZookeeperConfiguration.class })
@Import(value = {ZookeeperConfiguration.class})
public class SoulAdminApplication {

/**
Expand All @@ -42,5 +42,4 @@ public class SoulAdminApplication {
public static void main(final String[] args) {
SpringApplication.run(SoulAdminApplication.class, args);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,30 @@
import java.io.Serializable;

/**
* this is from by web front.
* this is application authority from by web front.
*
* @author xiaoyu(549477611 @ qq.com)
*/
@Data
public class AppAuthDTO implements Serializable {

/**
* primary key
*/
private String id;

/**
* application key
*/
private String appKey;

/**
* encryption secret
*/
private String appSecret;

/**
* whether enabled
*/
private Boolean enabled;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/

package org.dromara.soul.admin.dto;

import lombok.Data;

import java.io.Serializable;

/**
* this is dashboard user from by web front.
*
* @author jiangxiaofeng(programgeek @ 163.com)
*/
@Data
public class DashboardUserDTO implements Serializable {

/**
* primary key
*/
private String id;

/**
* user name
*/
private String userName;

/**
* user password
*/
private String password;

/**
* dashboard role
*/
private Integer role;

/**
* whether enabled
*/
private Boolean enabled;
}
Loading