Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
godcheese committed Mar 8, 2020
1 parent 2be9209 commit 3b8316a
Show file tree
Hide file tree
Showing 2,190 changed files with 56,451 additions and 28,546 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

## Changelog
- v0.7.0 2020.03.08
- 新的界面(20200307)
- v0.6.5 2019.11.26
- 修复大量 bug(20191126)
- v0.5.5 2019.05.12
Expand Down
29 changes: 18 additions & 11 deletions db/mysql/nimrod/nimrod.sql
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*
Navicat Premium Data Transfer
Source Server : 192.168.1.5
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50724
Source Host : 192.168.1.5:3306
Source Host : localhost:3306
Source Schema : nimrod
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65001
Date: 27/11/2019 17:07:36
Date: 07/03/2020 18:30:16
*/

SET NAMES utf8mb4;
Expand Down Expand Up @@ -477,7 +477,7 @@ CREATE TABLE `dictionary` (
-- Records of dictionary
-- ----------------------------
INSERT INTO `dictionary` VALUES (1, 'WEB', '网站配置', '网站名', 'NAME', 'Nimrod', 3, 1, 0, '', '2019-09-24 03:24:39', '2018-07-08 15:29:33');
INSERT INTO `dictionary` VALUES (2, 'WEB', '网站配置', '页脚版权', 'FOOTER', 'Copyright © 2019 Nimrod.All rights reserved.', 3, 1, 0, '', '2019-01-04 08:34:31', '2018-07-08 15:29:33');
INSERT INTO `dictionary` VALUES (2, 'WEB', '网站配置', '页脚版权', 'FOOTER', 'Copyright © 2020 Nimrod.All rights reserved.', 3, 1, 0, '', '2020-03-07 03:41:46', '2018-07-08 15:29:33');
INSERT INTO `dictionary` VALUES (3, 'MAIL', '电子邮箱发信配置', '主机', 'HOST', 'smtp.mail.example.com', 4, 1, 0, '企业邮箱:https://mail.example.com/', '2018-07-08 15:29:33', '2018-07-08 15:29:33');
INSERT INTO `dictionary` VALUES (4, 'MAIL', '电子邮箱发信配置', '协议', 'PROTOCOL', 'smtp', 4, 1, 0, '', '2018-07-08 15:29:33', '2018-07-08 15:29:33');
INSERT INTO `dictionary` VALUES (5, 'MAIL', '电子邮箱发信配置', '端口号', 'PORT', '25', 4, 1, 0, '', '2018-07-08 15:29:33', '2018-07-08 15:29:33');
Expand Down Expand Up @@ -632,7 +632,7 @@ CREATE TABLE `operation_log` (
`status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '响应状态码',
`gmt_created` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7498 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '操作日志表' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 481 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '操作日志表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for role
Expand Down Expand Up @@ -744,7 +744,7 @@ CREATE TABLE `user` (
-- ----------------------------
INSERT INTO `user` VALUES (1, 'normal_user', '$2a$10$IEK236NdbYiZzYVAHTl4qeIgPInJQwMqRh/c986PKwEN4/T1DbsSm', '', 'normal_user@outlook.com', 1, 1, 0, '测试备注', NULL, '2019-10-31 13:54:41', '2018-06-27 21:22:40');
INSERT INTO `user` VALUES (2, 'admin', '$2a$10$IEK236NdbYiZzYVAHTl4qeIgPInJQwMqRh/c986PKwEN4/T1DbsSm', '', 'admin@outlook.com', 1, 1, 1, '测试备注', NULL, '2019-11-05 02:29:23', '2018-06-27 21:22:40');
INSERT INTO `user` VALUES (999, 'system_admin', '$2a$10$IEK236NdbYiZzYVAHTl4qeIgPInJQwMqRh/c986PKwEN4/T1DbsSm', '', 'system_admin@outlook.com', 1, 1, 1, '测试备注', NULL, '2019-11-26 06:41:33', '2018-06-27 21:22:40');
INSERT INTO `user` VALUES (999, 'system_admin', '$2a$10$IEK236NdbYiZzYVAHTl4qeIgPInJQwMqRh/c986PKwEN4/T1DbsSm', '', 'system_admin@outlook.com', 1, 1, 1, '测试备注', NULL, '2020-03-06 10:52:51', '2018-06-27 21:22:40');

-- ----------------------------
-- Table structure for user_role
Expand Down Expand Up @@ -830,15 +830,22 @@ CREATE TABLE `view_menu_category` (
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`gmt_created` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视图菜单分类表' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视图菜单分类表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of view_menu_category
-- ----------------------------
INSERT INTO `view_menu_category` VALUES (1, '系统管理', 'fa fa-cog', NULL, 0, '', '2019-06-06 02:51:28', '2018-07-01 21:28:04');
INSERT INTO `view_menu_category` VALUES (2, '系统配置', 'fa fa-cog', 1, 0, '', '2019-06-13 04:16:55', '2018-07-01 21:28:04');
INSERT INTO `view_menu_category` VALUES (3, '用户配置', 'fa fa-user', 1, 0, '', '2019-06-13 07:22:32', '2018-07-01 21:28:04');
INSERT INTO `view_menu_category` VALUES (4, 'Quartz 任务', 'fa fa-bars', 2, 0, '', NULL, NULL);
INSERT INTO `view_menu_category` VALUES (1, '系统管理', 'iconfont icon-cog', NULL, 0, '', '2019-12-30 06:11:27', '2018-07-01 21:28:04');
INSERT INTO `view_menu_category` VALUES (2, '系统配置', 'iconfont icon-cog', 1, 0, '', '2019-06-13 04:16:55', '2018-07-01 21:28:04');
INSERT INTO `view_menu_category` VALUES (3, '用户配置', 'iconfont icon-user', 1, 0, '', '2019-06-13 07:22:32', '2018-07-01 21:28:04');
INSERT INTO `view_menu_category` VALUES (4, 'Quartz 任务', 'iconfont icon-cog', 2, 0, '', NULL, NULL);
INSERT INTO `view_menu_category` VALUES (5, '测试菜单', 'iconfont icon-cog', NULL, 0, '', '2019-12-30 06:11:41', '2019-12-17 10:38:53');
INSERT INTO `view_menu_category` VALUES (6, '系统管理系统管', 'iconfont icon-cog', NULL, 0, '', '2019-12-30 06:11:46', '2019-12-17 10:51:36');
INSERT INTO `view_menu_category` VALUES (7, '系统管理系统管2', 'iconfont icon-cog', NULL, 0, '', '2019-12-30 06:11:52', '2019-12-17 10:55:09');
INSERT INTO `view_menu_category` VALUES (8, '系统管理系统管3', 'iconfont icon-cog', NULL, 0, '', '2019-12-30 06:11:56', '2019-12-17 10:55:19');
INSERT INTO `view_menu_category` VALUES (9, '系统管理系统管4', 'iconfont icon-cog', NULL, 0, '', '2019-12-30 06:12:00', '2019-12-17 10:56:24');
INSERT INTO `view_menu_category` VALUES (10, '系统管理系统管5', 'iconfont icon-cog', NULL, 0, '', '2019-12-30 06:12:03', '2019-12-17 10:56:30');
INSERT INTO `view_menu_category` VALUES (11, '系统管理系统管6', 'iconfont icon-cog', NULL, 0, '', '2019-12-30 06:12:07', '2019-12-17 10:56:36');

-- ----------------------------
-- Table structure for view_page
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

<groupId>com.gioov</groupId>
<artifactId>nimrod</artifactId>
<version>0.6.5</version>
<version>0.7.0</version>
<!-- jar 打包引用此属性值 -->
<packaging>jar</packaging>
<!-- <packaging>jar</packaging>-->
<!-- war 打包引用此属性值 -->
<!-- <packaging>war</packaging> -->
<packaging>war</packaging>
<name>${project.artifactId}</name>
<description>Demo project for Spring Boot</description>
<url>http://www.godcheese.com/</url>
Expand Down Expand Up @@ -202,9 +202,9 @@
<resource>
<directory>${project.basedir}/lib</directory>
<!-- jar 打包引用此属性值 -->
<targetPath>BOOT-INF/lib</targetPath>
<!-- <targetPath>BOOT-INF/lib</targetPath> -->
<!-- war 打包引用此属性值 -->
<!-- <targetPath>${project.basedir}/target/${project.build.finalName}/WEB-INF/lib</targetPath> -->
<targetPath>${project.basedir}/target/${project.build.finalName}/WEB-INF/lib</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
Expand Down
Binary file modified screenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/main/java/com/gioov/NimrodBootstrap.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ private static void bootstrap(WebApplicationContext webApplicationContext) {
String port = Common.Host.port;
String contextPath = Common.Host.contextPath;
String ip = Common.Host.ip;
LOGGER.info("ip={}", ip);
String local = scheme + "://localhost" + ":" + port + contextPath + "/";
String network = scheme + "://" + ip + ":" + port + contextPath + "/";
if(ip == null) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/gioov/example/Example.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
*/
public class Example {

public class Page {
public static class Page {
public static final String EXAMPLE = "/example";
}

public class Api {
public static class Api {
public static final String EXAMPLE = com.gioov.nimrod.common.Url.API + Example.Page.EXAMPLE;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/gioov/example/mapper/ExampleMapper.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.gioov.example.mapper;

import com.gioov.tile.mybatis.CrudMapper;
import com.gioov.example.entity.ExampleEntity;
import com.gioov.tile.mybatis.CrudMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/gioov/nimrod/common/easyui/Easyui.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
* @date 2019-09-26
*/
public class EasyUI {

/**
* Tree TreeGrid state: The node state, 'open' or 'closed'.
*/
public static class State {
public static final String CLOSED = "closed";
public static final String OPEN = "open";

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public void before(JoinPoint joinpoint) throws JsonProcessingException {
@AfterReturning(pointcut = "operationLogAspect()", returning = "returning")
public void afterReturning(Object returning) {
LOGGER.info("returning={}", returning);
LOGGER.info("returning={}", operationLogEntity);
applicationContext.publishEvent(new OperationLogEvent(operationLogEntity));
}

Expand All @@ -119,9 +118,6 @@ public void afterThrowing(Throwable throwing) {
throwing.printStackTrace(printWriter);
}
operationLogEntity.setStackTrace(stringWriter.toString());
LOGGER.info("throwing={}", throwing);
LOGGER.info("throwing={}", operationLogEntity);
applicationContext.publishEvent(new OperationLogEvent(operationLogEntity));
}

}
8 changes: 2 additions & 6 deletions src/main/java/com/gioov/nimrod/common/others/Common.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@

import javax.management.*;
import java.io.IOException;
import java.util.*;
import java.util.Properties;
import java.util.TimeZone;

/**
* @author godcheese [godcheese@outlook.com]
Expand Down Expand Up @@ -88,11 +89,6 @@ public static void getHost(WebApplicationContext webApplicationContext) {
e.printStackTrace();
}
Host.contextPath = webApplicationContext.getServletContext().getContextPath();
LOGGER.info("ip={}", Host.ip);
LOGGER.info("serverInfo={}", Host.serverInfo);
LOGGER.info("scheme={}", Host.scheme);
LOGGER.info("port={}", Host.port);
LOGGER.info("contextPath={}", Host.contextPath);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
* @author godcheese [godcheese@outlook.com]
* @date 2018-02-22
Expand All @@ -16,7 +12,7 @@
@ConfigurationProperties(prefix = "nimrod", ignoreUnknownFields = true, ignoreInvalidFields = true)
public class NimrodProperties {

private String version = "0.6.5";
private String version = "0.7.0";
private String url = "https://github.com/godcheese/nimrod";

public String getVersion() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package com.gioov.nimrod.common.properties;

import org.springframework.boot.autoconfigure.web.servlet.MultipartProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import javax.servlet.MultipartConfigElement;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public void onAuthenticationFailure(HttpServletRequest httpServletRequest, HttpS
} else if(e instanceof BadCredentialsException) {
printWriter.write(common.objectToJson(failureEntity.i18n("user.login_fail_account_or_password_error")));
} else if(e instanceof DisabledException) {
LOGGER.info("e.getClass={}", e.getClass());
LOGGER.info("e.getMessage={}", e.getMessage());
printWriter.write(common.objectToJson(failureEntity.i18n("user.login_fail_account_or_password_error")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ public SimpleUserDetails loadUserByUsername(String account) {
// if(authority.indexOf(ROLE_PREFIX) == 0 && isExistSystemAdminRole(authority.substring(ROLE_PREFIX.length()))) {
// isExistSystemAdminRole = true;
// }
LOGGER.info("simpleGrantedAuthority.getAuthority()={}", simpleGrantedAuthority.getAuthority());
LOGGER.info("simpleGrantedAuthority.getAuthority().equals(ROLE_PREFIX + SYSTEM_ADMIN)={}", simpleGrantedAuthority.getAuthority().equals(ROLE_PREFIX + SYSTEM_ADMIN));
if(simpleGrantedAuthority.getAuthority().equals(ROLE_PREFIX + SYSTEM_ADMIN)) {
isExistSystemAdminRole = true;
}
Expand Down Expand Up @@ -223,7 +221,6 @@ public static SimpleUser getCurrentSimpleUser(HttpServletRequest request) {
*/
public static boolean isExistsAuthority(Collection<GrantedAuthority> authorities, String authority) {
for(GrantedAuthority grantedAuthority : authorities) {
LOGGER.info("grantedAuthority.getAuthority().equals(authority)={}", grantedAuthority.getAuthority().equals(authority));
if(grantedAuthority.getAuthority().equals(authority) || grantedAuthority.getAuthority().equals(ROLE_PREFIX + SYSTEM_ADMIN)) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import com.gioov.nimrod.common.Url;
import com.gioov.nimrod.common.druid.DruidConfiguration;
import com.gioov.nimrod.common.properties.AppProperties;
import com.gioov.nimrod.user.User;
import com.gioov.nimrod.system.System;
import com.gioov.nimrod.user.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.gioov.nimrod.mail.service.impl;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.gioov.nimrod.common.easyui.Pagination;
import com.gioov.nimrod.common.others.Common;
import com.gioov.nimrod.common.others.FailureEntity;
import com.gioov.nimrod.common.easyui.Pagination;
import com.gioov.nimrod.mail.entity.MailEntity;
import com.gioov.nimrod.mail.mapper.MailMapper;
import com.gioov.nimrod.mail.service.MailService;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/gioov/nimrod/quartz/Quartz.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
*/
public class Quartz {

public class Page {
public static class Page {
public static final String QUARTZ = "/quartz";
public static final String JOB = Page.QUARTZ + "/job";
public static final String JOB_RUNTIME_LOG = Page.QUARTZ + "/job_runtime_log";
}

public class Api {
public static class Api {
public static final String QUARTZ = com.gioov.nimrod.common.Url.API + Page.QUARTZ;
public static final String JOB = Api.QUARTZ + "/job";
public static final String JOB_RUNTIME_LOG = Api.QUARTZ + "/job_runtime_log";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.gioov.nimrod.quartz.api;

import com.gioov.nimrod.common.easyui.Pagination;
import com.gioov.nimrod.common.operationlog.OperationLog;
import com.gioov.nimrod.common.operationlog.OperationLogType;
import com.gioov.nimrod.quartz.Quartz;
import com.gioov.nimrod.quartz.entity.JobRuntimeLogEntity;
import com.gioov.nimrod.quartz.service.JobRuntimeLogService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package com.gioov.nimrod.quartz.listener;

import com.gioov.nimrod.common.others.SpringContextUtil;
import com.gioov.nimrod.quartz.entity.JobRuntimeLogEntity;
import com.gioov.nimrod.quartz.mapper.JobRuntimeLogMapper;
Expand Down Expand Up @@ -30,6 +29,7 @@ public class GlobalJobListener implements JobListener {

public GlobalJobListener() {
jobRuntimeLogMapper = (JobRuntimeLogMapper) SpringContextUtil.getBean("jobRuntimeLogMapper", JobRuntimeLogMapper.class);
LOGGER.info("jobRuntimeLogMapper={}", jobRuntimeLogMapper);
}

private JobRuntimeLogEntity jobRuntimeLogEntity = new JobRuntimeLogEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ public interface JobRuntimeLogMapper extends CrudMapper<JobRuntimeLogEntity, Lon
* @return Page<JobRuntimeLogEntity>
*/
Page<JobRuntimeLogEntity> pageAll();

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import com.gioov.nimrod.common.easyui.Pagination;
import com.gioov.nimrod.quartz.entity.JobRuntimeLogEntity;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.gioov.nimrod.quartz.service.impl;

import com.gioov.nimrod.common.others.SpringContextUtil;
import com.gioov.nimrod.common.easyui.Pagination;
import com.gioov.nimrod.common.others.SpringContextUtil;
import com.gioov.nimrod.quartz.entity.JobRuntimeLogEntity;
import com.gioov.nimrod.quartz.mapper.JobRuntimeLogMapper;
import com.gioov.nimrod.quartz.service.JobRuntimeLogService;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.gioov.nimrod.quartz.service.impl;

import com.gioov.nimrod.common.others.FailureEntity;
import com.gioov.nimrod.common.easyui.Pagination;
import com.gioov.nimrod.common.others.FailureEntity;
import com.gioov.nimrod.quartz.entity.JobEntity;
import com.gioov.nimrod.quartz.job.BaseJob;
import com.gioov.nimrod.quartz.mapper.JobMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.gioov.nimrod.system.api;

import com.gioov.nimrod.common.easyui.ComboTree;
import com.gioov.nimrod.common.easyui.Pagination;
import com.gioov.nimrod.common.operationlog.OperationLog;
import com.gioov.nimrod.common.operationlog.OperationLogType;
import com.gioov.nimrod.system.System;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.gioov.nimrod.system.api;

import com.gioov.nimrod.common.others.Common;
import com.gioov.nimrod.common.easyui.Pagination;
import com.gioov.nimrod.common.operationlog.OperationLog;
import com.gioov.nimrod.common.operationlog.OperationLogType;
import com.gioov.nimrod.common.others.Common;
import com.gioov.nimrod.system.System;
import com.gioov.nimrod.system.entity.DictionaryEntity;
import com.gioov.nimrod.system.service.DictionaryService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
@RestController
@RequestMapping(value = System.Api.FILE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class FileRestController {

private static final Logger LOGGER = LoggerFactory.getLogger(FileRestController.class);

private static final String FILE = "/API/SYSTEM/FILE";
Expand Down
Loading

0 comments on commit 3b8316a

Please sign in to comment.