mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-01-01 12:55:05 +08:00
feat: skyeye-ehr,skyeye-jobdiary合入skyeye-adm
This commit is contained in:
parent
439e23d7af
commit
c397f71234
96 changed files with 44 additions and 1303 deletions
|
@ -57,8 +57,6 @@
|
|||
|skyeye-rmprogram |8089 |小程序设计器模块 |rmprogram-web.jar |
|
||||
|skyeye-notice |8096 |公告模块 |notice-web.jar |
|
||||
|skyeye-forum |8097 |论坛模块 |forum-web.jar |
|
||||
|skyeye-jobdiary |8098 |工作日报模块 |jobdiary-web.jar |
|
||||
|skyeye-ehr |8100 |EHR模块 |ehr-web.jar |
|
||||
|skyeye-wages |8101 |薪资模块 |wages-web.jar |
|
||||
|skyeye-deploy |8010 |部署模块 |deploy-web.war |
|
||||
|skyeye-schedule |8095 |日程模块 |schedule-web.jar |
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
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>skyeye-jobdiary</artifactId>
|
||||
<artifactId>skyeye-adm</artifactId>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jobdiary-pro</artifactId>
|
||||
<artifactId>adm-ehr</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>jobdiary-entity</artifactId>
|
||||
<artifactId>adm-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
|
@ -19,6 +19,12 @@
|
|||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>adm-ehr</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.deepoove</groupId>
|
||||
<artifactId>poi-tl</artifactId>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.classenum;
|
||||
package com.skyeye.eve.jobdiary.classenum;
|
||||
|
||||
import com.skyeye.common.base.classenum.SkyeyeEnumClass;
|
||||
import lombok.AllArgsConstructor;
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.classenum;
|
||||
package com.skyeye.eve.jobdiary.classenum;
|
||||
|
||||
import com.skyeye.common.base.classenum.SkyeyeEnumClass;
|
||||
import com.skyeye.common.util.DateUtil;
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.classenum;
|
||||
package com.skyeye.eve.jobdiary.classenum;
|
||||
|
||||
import com.skyeye.common.base.classenum.SkyeyeEnumClass;
|
||||
import lombok.AllArgsConstructor;
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.controller;
|
||||
package com.skyeye.eve.jobdiary.controller;
|
||||
|
||||
import com.skyeye.annotation.api.Api;
|
||||
import com.skyeye.annotation.api.ApiImplicitParam;
|
||||
|
@ -11,8 +11,8 @@ import com.skyeye.annotation.api.ApiOperation;
|
|||
import com.skyeye.common.entity.search.CommonPageInfo;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.eve.entity.JobDiary;
|
||||
import com.skyeye.eve.service.JobDiaryService;
|
||||
import com.skyeye.eve.jobdiary.entity.JobDiary;
|
||||
import com.skyeye.eve.jobdiary.service.JobDiaryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
|
@ -2,10 +2,11 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.dao;
|
||||
package com.skyeye.eve.jobdiary.dao;
|
||||
|
||||
import com.skyeye.common.entity.search.CommonPageInfo;
|
||||
import com.skyeye.eve.entity.JobDiary;
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
import com.skyeye.eve.jobdiary.entity.JobDiary;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
|
@ -2,9 +2,10 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.dao;
|
||||
package com.skyeye.eve.jobdiary.dao;
|
||||
|
||||
import com.skyeye.eve.entity.JobDiaryReceived;
|
||||
import com.skyeye.eve.dao.SkyeyeBaseMapper;
|
||||
import com.skyeye.eve.jobdiary.entity.JobDiaryReceived;
|
||||
|
||||
/**
|
||||
* @ClassName: JobDiaryReceivedDao
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.entity;
|
||||
package com.skyeye.eve.jobdiary.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.entity;
|
||||
package com.skyeye.eve.jobdiary.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
@ -2,10 +2,10 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.service;
|
||||
package com.skyeye.eve.jobdiary.service;
|
||||
|
||||
import com.skyeye.base.business.service.SkyeyeBusinessService;
|
||||
import com.skyeye.eve.entity.JobDiaryReceived;
|
||||
import com.skyeye.eve.jobdiary.entity.JobDiaryReceived;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -2,12 +2,12 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.service;
|
||||
package com.skyeye.eve.jobdiary.service;
|
||||
|
||||
import com.skyeye.base.business.service.SkyeyeBusinessService;
|
||||
import com.skyeye.common.object.InputObject;
|
||||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.eve.entity.JobDiary;
|
||||
import com.skyeye.eve.jobdiary.entity.JobDiary;
|
||||
|
||||
/**
|
||||
* @ClassName: JobDiaryService
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.service.impl;
|
||||
package com.skyeye.eve.jobdiary.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
@ -10,10 +10,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.skyeye.annotation.service.SkyeyeService;
|
||||
import com.skyeye.base.business.service.impl.SkyeyeBusinessServiceImpl;
|
||||
import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
|
||||
import com.skyeye.eve.classenum.ReadState;
|
||||
import com.skyeye.eve.dao.JobDiaryReceivedDao;
|
||||
import com.skyeye.eve.entity.JobDiaryReceived;
|
||||
import com.skyeye.eve.service.JobDiaryReceivedService;
|
||||
import com.skyeye.eve.jobdiary.classenum.ReadState;
|
||||
import com.skyeye.eve.jobdiary.dao.JobDiaryReceivedDao;
|
||||
import com.skyeye.eve.jobdiary.entity.JobDiaryReceived;
|
||||
import com.skyeye.eve.jobdiary.service.JobDiaryReceivedService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -2,7 +2,7 @@
|
|||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.service.impl;
|
||||
package com.skyeye.eve.jobdiary.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.github.pagehelper.Page;
|
||||
|
@ -18,13 +18,13 @@ import com.skyeye.common.object.InputObject;
|
|||
import com.skyeye.common.object.OutputObject;
|
||||
import com.skyeye.common.util.DateUtil;
|
||||
import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
|
||||
import com.skyeye.eve.classenum.JobDiaryState;
|
||||
import com.skyeye.eve.classenum.JobDiaryType;
|
||||
import com.skyeye.eve.classenum.ReadState;
|
||||
import com.skyeye.eve.dao.JobDiaryDao;
|
||||
import com.skyeye.eve.entity.JobDiary;
|
||||
import com.skyeye.eve.service.JobDiaryReceivedService;
|
||||
import com.skyeye.eve.service.JobDiaryService;
|
||||
import com.skyeye.eve.jobdiary.classenum.JobDiaryState;
|
||||
import com.skyeye.eve.jobdiary.classenum.JobDiaryType;
|
||||
import com.skyeye.eve.jobdiary.classenum.ReadState;
|
||||
import com.skyeye.eve.jobdiary.dao.JobDiaryDao;
|
||||
import com.skyeye.eve.jobdiary.entity.JobDiary;
|
||||
import com.skyeye.eve.jobdiary.service.JobDiaryReceivedService;
|
||||
import com.skyeye.eve.jobdiary.service.JobDiaryService;
|
||||
import com.skyeye.exception.CustomException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.skyeye.eve.dao.JobDiaryDao">
|
||||
<mapper namespace="com.skyeye.eve.jobdiary.dao.JobDiaryDao">
|
||||
|
||||
<select id="queryMysendJobDiaryList" resultType="java.util.Map">
|
||||
SELECT
|
|
@ -39,7 +39,8 @@ import java.util.Properties;
|
|||
|
||||
@Configuration
|
||||
@MapperScan(basePackages = {
|
||||
"com.skyeye.eve.*.dao"}, sqlSessionFactoryRef = "baseSqlSessionFactory")
|
||||
"com.skyeye.eve.*.dao",
|
||||
"com.skyeye.*.dao"}, sqlSessionFactoryRef = "baseSqlSessionFactory")
|
||||
public class BaseDataSourceConfig {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(BaseDataSourceConfig.class);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<module>adm-pro</module>
|
||||
<module>adm-web</module>
|
||||
<module>adm-survey</module>
|
||||
<module>adm-ehr</module>
|
||||
</modules>
|
||||
|
||||
<parent>
|
||||
|
|
18
skyeye-ehr/.gitignore
vendored
18
skyeye-ehr/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
18
skyeye-ehr/ehr-common/.gitignore
vendored
18
skyeye-ehr/ehr-common/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>skyeye-ehr</artifactId>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ehr-common</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 引入公共Rest模块 -->
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>skyeye-common-rest</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
18
skyeye-ehr/ehr-entity/.gitignore
vendored
18
skyeye-ehr/ehr-entity/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>skyeye-ehr</artifactId>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ehr-entity</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>ehr-common</artifactId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,29 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.eve.entity.ehr.common;
|
||||
|
||||
import com.skyeye.annotation.api.ApiModel;
|
||||
import com.skyeye.annotation.api.ApiModelProperty;
|
||||
import com.skyeye.common.entity.search.CommonPageInfo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @ClassName: PointStaffQueryDo
|
||||
* @Description: 根据员工id分页查询某些数据的条件实体类
|
||||
* @author: skyeye云系列--卫志强
|
||||
* @date: 2022/7/11 10:41
|
||||
* @Copyright: 2022 https://gitee.com/doc_wei01/skyeye Inc. All rights reserved.
|
||||
* 注意:本内容仅限购买后使用.禁止私自外泄以及用于其他的商业目的
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("根据员工id分页查询某些数据的条件实体类")
|
||||
public class PointStaffQueryDo extends CommonPageInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "员工id", required = "required")
|
||||
private String staffId;
|
||||
|
||||
}
|
18
skyeye-ehr/ehr-pro/.gitignore
vendored
18
skyeye-ehr/ehr-pro/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>skyeye-ehr</artifactId>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ehr-pro</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>ehr-entity</artifactId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
18
skyeye-ehr/ehr-web/.gitignore
vendored
18
skyeye-ehr/ehr-web/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
|
@ -1,105 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>skyeye-ehr</artifactId>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ehr-web</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>ehr-pro</artifactId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web-services</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- actuator监控 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<!-- admin监听包 -->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>2.0.3</version>
|
||||
</dependency>
|
||||
<!-- Spring Boot Actuator对外暴露引用的监控信息, Jolokia提供使用HTTP接口获取json -->
|
||||
<dependency>
|
||||
<groupId>org.jolokia</groupId>
|
||||
<artifactId>jolokia-core</artifactId>
|
||||
</dependency>
|
||||
<!-- 服务包 -->
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 资源文件拷贝插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!--spring-boot打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>springloaded</artifactId>
|
||||
<version>1.2.5.RELEASE</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<!--打包跳过测试 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- java编译插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,30 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableAutoConfiguration(exclude = {
|
||||
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
|
||||
})
|
||||
@ComponentScan(basePackages = {"com.skyeye"})
|
||||
@EnableTransactionManagement//启注解事务管理,等同于xml配置方式的 <tx:annotation-driven />
|
||||
@EnableDiscoveryClient
|
||||
@EnableFeignClients
|
||||
public class SkyEhrApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(SkyEhrApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.db.config;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
|
||||
import com.skyeye.common.constans.CommonConstants;
|
||||
import com.skyeye.exception.CustomException;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
@Configuration
|
||||
@MapperScan(basePackages = {
|
||||
"com.skyeye.eve.dao",
|
||||
"com.skyeye.eve.*.dao",
|
||||
"com.skyeye.*.dao"}, sqlSessionFactoryRef = "baseSqlSessionFactory")
|
||||
public class BaseDataSourceConfig {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(BaseDataSourceConfig.class);
|
||||
|
||||
protected static Properties databaseTypeMappings = CommonConstants.getDefaultDatabaseTypeMappings();
|
||||
|
||||
@Autowired
|
||||
protected ResourceLoader resourceLoader;
|
||||
|
||||
/**
|
||||
* Primary 必须加此注解,不然报错,下一个类则不需要添加,表示这个数据源是默认数据源
|
||||
* ConfigurationProperties(prefix)值必须是application.properteis中对应属性的前缀
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "baseDataSource")
|
||||
@Primary
|
||||
@ConfigurationProperties(prefix = "spring.datasource")
|
||||
public DataSource baseDataSource() {
|
||||
return DataSourceBuilder.create().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* a、SqlSessionFactory 一旦被创建就应该在应用的运行期间一直存在,没有任何理由对它进行清除或重建。
|
||||
* b、使用 SqlSessionFactory 的最佳实践是在应用运行期间不要重复创建多次,多次重建 SqlSessionFactory 被视为一种代码“坏味道(bad smell)”。
|
||||
* c、因此 SqlSessionFactory 的最佳作用域是应用作用域。有很多方法可以做到,最简单的就是使用单例模式或者静态单例模式。
|
||||
*
|
||||
* @param dataSource
|
||||
* @return
|
||||
*/
|
||||
@Primary
|
||||
@Bean(name = "baseSqlSessionFactory")
|
||||
public SqlSessionFactory baseSqlSessionFactory(@Qualifier("baseDataSource") DataSource dataSource) {
|
||||
MybatisSqlSessionFactoryBean sqlSessionFactoryBean = new MybatisSqlSessionFactoryBean();
|
||||
|
||||
sqlSessionFactoryBean.setDataSource(dataSource);
|
||||
String databaseType = this.initDatabaseType(dataSource);
|
||||
if (databaseType == null) {
|
||||
throw new CustomException("couldn't deduct database type");
|
||||
} else {
|
||||
try {
|
||||
// 添加XML目录
|
||||
sqlSessionFactoryBean.setMapperLocations(resolveMapperLocations());
|
||||
sqlSessionFactoryBean.afterPropertiesSet();
|
||||
return sqlSessionFactoryBean.getObject();
|
||||
} catch (Exception var5) {
|
||||
throw new CustomException("Could not create sqlSessionFactory", var5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Resource[] resolveMapperLocations() {
|
||||
ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
|
||||
List<String> mapperLocations = new ArrayList<>();
|
||||
mapperLocations.add("classpath*:mapper/**/*.xml");
|
||||
List<Resource> resources = new ArrayList();
|
||||
if (!CollectionUtils.isEmpty(mapperLocations)) {
|
||||
for (String mapperLocation : mapperLocations) {
|
||||
try {
|
||||
Resource[] mappers = resourceResolver.getResources(mapperLocation);
|
||||
resources.addAll(Arrays.asList(mappers));
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Get myBatis resources happened exception", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return resources.toArray(new Resource[resources.size()]);
|
||||
}
|
||||
|
||||
@Primary
|
||||
@Bean(name = "transactionManager")
|
||||
public PlatformTransactionManager transactionManager(@Qualifier("baseDataSource") DataSource dataSourceOne) {
|
||||
return new DataSourceTransactionManager(dataSourceOne);
|
||||
}
|
||||
|
||||
@Primary
|
||||
@Bean(name = "sqlSessionTemplate")
|
||||
public SqlSessionTemplate sqlSessionTemplate(@Qualifier("baseSqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
|
||||
// 使用上面配置的Factory
|
||||
return new SqlSessionTemplate(sqlSessionFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*
|
||||
* @param dataSource
|
||||
* @return
|
||||
*/
|
||||
protected String initDatabaseType(@Qualifier("baseDataSource") DataSource dataSource) {
|
||||
String databaseType = null;
|
||||
Connection connection = null;
|
||||
|
||||
try {
|
||||
connection = dataSource.getConnection();
|
||||
DatabaseMetaData databaseMetaData = connection.getMetaData();
|
||||
String databaseProductName = databaseMetaData.getDatabaseProductName();
|
||||
LOGGER.info("database product name: '{}'", databaseProductName);
|
||||
databaseType = databaseTypeMappings.getProperty(databaseProductName);
|
||||
if (databaseType == null) {
|
||||
throw new CustomException("couldn't deduct database type from database product name '" + databaseProductName + "'");
|
||||
}
|
||||
|
||||
LOGGER.info("using database type: {}", databaseType);
|
||||
} catch (SQLException var14) {
|
||||
LOGGER.error("Exception while initializing Database connection", var14);
|
||||
} finally {
|
||||
try {
|
||||
if (connection != null) {
|
||||
connection.close();
|
||||
}
|
||||
} catch (SQLException var13) {
|
||||
LOGGER.error("Exception while closing the Database connection", var13);
|
||||
}
|
||||
|
||||
}
|
||||
databaseType = ("dm".equals(databaseType)) ? "oracle" : databaseType;
|
||||
return databaseType;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/**
|
||||
* _ooOoo_
|
||||
* o8888888o
|
||||
* 88" . "88
|
||||
* (| -_- |)
|
||||
* O\ = /O
|
||||
* ____/`---'\____
|
||||
* .' \\| |// `.
|
||||
* / \\||| : |||// \
|
||||
* / _||||| -:- |||||- \
|
||||
* | | \\\ - /// | |
|
||||
* | \_| ''\---/'' | |
|
||||
* \ .-\__ `-` ___/-. /
|
||||
* ___`. .' /--.--\ `. . __
|
||||
* ."" '< `.___\_<|>_/___.' >'"".
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | |
|
||||
* \ \ `-. \_ __\ /__ _/ .-` / /
|
||||
* ======`-.____`-.___\_____/___.-`____.-'======
|
||||
* `=---='
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* 佛祖保佑 永无BUG
|
||||
* 佛曰:
|
||||
* 写字楼里写字间,写字间里程序员;
|
||||
* 程序人员写程序,又拿程序换酒钱。
|
||||
* 酒醒只在网上坐,酒醉还来网下眠;
|
||||
* 酒醉酒醒日复日,网上网下年复年。
|
||||
* 但愿老死电脑间,不愿鞠躬老板前;
|
||||
* 奔驰宝马贵者趣,公交自行程序员。
|
||||
* 别人笑我忒疯癫,我笑自己命太贱;
|
||||
* 不见满街漂亮妹,哪个归得程序员?
|
||||
* :: springboot 2.x
|
||||
* :: Skyeye系列框架,作者:卫志强
|
||||
* :: 作者独家专属,未购买禁止私自使用
|
||||
* 启动:nohup java -jar -Dspring.cloud.nacos.discovery.server-addr=localhost:9000 -Dspring.cloud.nacos.config.server-addr=localhost:9000 -Dspring.profiles.active=dev ehr-web.jar >> /opt/service/project/nohup-ehr.out 2>&1 &
|
||||
* 清空日志:cat /dev/null > xxx-web.out
|
||||
*/
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
server:
|
||||
port: 8100
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: skyeye-ehr-${spring.profiles.active} # 服务名
|
||||
profiles:
|
||||
active: public
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: localhost:9000 # 配置服务注册nacos地址
|
||||
namespace: ${spring.profiles.active} # 配置命名空间
|
||||
service: ${spring.application.name} # 配置服务名
|
||||
config:
|
||||
# 指定nacos server的地址
|
||||
server-addr: localhost:9000
|
||||
# 配置文件后缀
|
||||
file-extension: yml
|
||||
# 命名空间 常用场景之一是不同环境的配置的区分隔离,例如开发测试环境和生产环境的资源(如配置、服务)隔离等
|
||||
namespace: ${spring.profiles.active} # 配置命名空间
|
||||
# 支持多个共享 Data Id 的配置,优先级小于ext-config,自定义 Data Id 配置 属性是个集合,内部由 Config POJO 组成。Config 有 3 个属性,分别是 dataId, group 以及 refresh
|
||||
ext-config:
|
||||
- data-id: skyeye-common.yml # 配置文件名-Data Id
|
||||
group: DEFAULT_GROUP # 默认为DEFAULT_GROUP
|
||||
refresh: false # 是否动态刷新,默认为false
|
||||
logging:
|
||||
level:
|
||||
com.skyeye: debug
|
||||
|
||||
feign:
|
||||
client:
|
||||
config:
|
||||
# 全局配置
|
||||
default:
|
||||
loggerLevel: FULL
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
### set log levels这里的INFO,Stdout,D,E可以理解为变量,也可以说是输出平台,在下面我们可以看到 ###
|
||||
log4j.rootLogger = INFO, C, D, E
|
||||
|
||||
### console控制台输出 ###
|
||||
log4j.appender.C = org.apache.log4j.ConsoleAppender
|
||||
### System.out也就是输出 out输出是黑色字体,err输出的字体是红色 ###
|
||||
log4j.appender.C.Target = System.out
|
||||
### layout是指布局,也就是说输出日志信息的格式样式,在这里我们使用的是log4j提供的 ###
|
||||
log4j.appender.C.layout = org.apache.log4j.PatternLayout
|
||||
### 这里就是指定我们日志文件以哪一种格式去输出 ###
|
||||
log4j.appender.C.layout.ConversionPattern = [skyeye-promote][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
|
||||
|
||||
|
||||
### log file INFO级别输出日志文件 ###
|
||||
log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
|
||||
### 指定日志输出位置 ###
|
||||
log4j.appender.D.File = ../logs/skyeye.log
|
||||
### 这个的意思是指是追加还是覆盖 默认是 true true是追加 false是覆盖 ###
|
||||
log4j.appender.D.Append = true
|
||||
### 这个是指日志输出的级别在这里指定的是 INFO级别 ###
|
||||
log4j.appender.D.Threshold = INFO
|
||||
### layout是指布局,也就是说输出日志信息的格式样式,在这里我们使用的是log4j提供的 ###
|
||||
log4j.appender.D.layout = org.apache.log4j.PatternLayout
|
||||
### 这里就是指定我们日志文件以哪一种格式去输出 ###
|
||||
log4j.appender.D.layout.ConversionPattern = [skyeye-promote][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
|
||||
|
||||
|
||||
### exception ERROR级别输出日志文件 ###
|
||||
#这个跟上面一样 只不过是日志级别是 ERROR级的,方便我们直接查看系统异常信息
|
||||
log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.E.File = ../logs/skyeye_error.log
|
||||
log4j.appender.E.Append = true
|
||||
log4j.appender.E.Threshold = ERROR
|
||||
log4j.appender.E.layout = org.apache.log4j.PatternLayout
|
||||
log4j.appender.E.layout.ConversionPattern = [skyeye-promote][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
|
||||
|
||||
#localhost日志文件输出级别为INFO
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
|
||||
#localhost日志文件输出处理类2localhost.org.apache.juli.FileHandler
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
|
||||
|
||||
#manager日志文件输出级别为INFO
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
|
||||
#manager日志文件输出处理类3manager.org.apache.juli.FileHandler
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
|
||||
|
||||
#host-manager日志文件输出级别为INFO
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
|
||||
#host-manager日志文件输出处理类4host-manager.org.apache.juli.FileHandler
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
|
||||
|
||||
#设置包名的输出级别
|
||||
log4j.logger.com.skyeye.common.filter=info, database
|
||||
# 记录日志至数据库
|
||||
# 这里定义了数据源
|
||||
log4j.appender.database=org.apache.log4j.jdbc.JDBCAppender
|
||||
log4j.appender.database.driver=com.mysql.jdbc.Driver
|
||||
# BufferSize就是每次缓存多少条数据然后插入数据库,为了演示这里设置为1
|
||||
log4j.appender.database.BufferSize=1
|
||||
# 数据库连接池
|
||||
# 设置要将日志插入到数据库的驱动
|
||||
log4j.appender.database.Threshold=info
|
||||
log4j.appender.database.URL=${jdbc.database.path}
|
||||
log4j.appender.database.user=${jdbc.database.username}
|
||||
log4j.appender.database.password=${jdbc.database.password}
|
||||
# 看名字也该明白这里是定义Sql语句的啦
|
||||
log4j.appender.database.sql=insert into sys_work_log (id, class, mothod, create_time, log_level, log_line, message, user_name, file_name, real_path, req_ip) values (REPLACE(UUID(), '-', ''), '%C', '%M', '%d{yyyy-MM-dd HH:mm:ss}', '%p', '%l', '%m', '%X{userName}', '%F', '%X{realPath}', '%X{ip}')
|
||||
log4j.appender.database.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>skyeye-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>skyeye-ehr</artifactId>
|
||||
<version>1-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>ehr-common</module>
|
||||
<module>ehr-entity</module>
|
||||
<module>ehr-pro</module>
|
||||
<module>ehr-web</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
18
skyeye-jobdiary/.gitignore
vendored
18
skyeye-jobdiary/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
18
skyeye-jobdiary/jobdiary-common/.gitignore
vendored
18
skyeye-jobdiary/jobdiary-common/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>skyeye-jobdiary</artifactId>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jobdiary-common</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 引入公共Rest模块 -->
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>skyeye-common-rest</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
18
skyeye-jobdiary/jobdiary-entity/.gitignore
vendored
18
skyeye-jobdiary/jobdiary-entity/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
|
@ -1,24 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>skyeye-jobdiary</artifactId>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jobdiary-entity</artifactId>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>jobdiary-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
18
skyeye-jobdiary/jobdiary-pro/.gitignore
vendored
18
skyeye-jobdiary/jobdiary-pro/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
18
skyeye-jobdiary/jobdiary-web/.gitignore
vendored
18
skyeye-jobdiary/jobdiary-web/.gitignore
vendored
|
@ -1,18 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.ear
|
||||
|
||||
class
|
||||
.idea
|
||||
*.iml
|
||||
.settings
|
||||
*.classpath
|
||||
/bin
|
||||
/images/
|
||||
classes
|
||||
/target/
|
||||
/.project/
|
||||
/.metadata/
|
||||
/logs/
|
|
@ -1,106 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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>skyeye-jobdiary</artifactId>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jobdiary-web</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>jobdiary-pro</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web-services</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- actuator监控 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<!-- admin监听包 -->
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>2.0.3</version>
|
||||
</dependency>
|
||||
<!-- Spring Boot Actuator对外暴露引用的监控信息, Jolokia提供使用HTTP接口获取json -->
|
||||
<dependency>
|
||||
<groupId>org.jolokia</groupId>
|
||||
<artifactId>jolokia-core</artifactId>
|
||||
</dependency>
|
||||
<!-- 服务包 -->
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 资源文件拷贝插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!--spring-boot打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>springloaded</artifactId>
|
||||
<version>1.2.5.RELEASE</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
|
||||
<!--打包跳过测试 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- java编译插件 -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -1,30 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableAutoConfiguration(exclude = {
|
||||
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class
|
||||
})
|
||||
@ComponentScan(basePackages = {"com.skyeye"})
|
||||
@EnableTransactionManagement//启注解事务管理,等同于xml配置方式的 <tx:annotation-driven />
|
||||
@EnableDiscoveryClient
|
||||
@EnableFeignClients
|
||||
public class SkyJobdiaryApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(SkyJobdiaryApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,163 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 卫志强 QQ:598748873@qq.com Inc. All rights reserved. 开源地址:https://gitee.com/doc_wei01/skyeye
|
||||
******************************************************************************/
|
||||
|
||||
package com.skyeye.db.config;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean;
|
||||
import com.skyeye.common.constans.CommonConstants;
|
||||
import com.skyeye.exception.CustomException;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.mybatis.spring.SqlSessionTemplate;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.io.IOException;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
@Configuration
|
||||
@MapperScan(basePackages = {
|
||||
"com.skyeye.eve.dao",
|
||||
"com.skyeye.eve.*.dao"}, sqlSessionFactoryRef = "baseSqlSessionFactory")
|
||||
public class BaseDataSourceConfig {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(BaseDataSourceConfig.class);
|
||||
|
||||
protected static Properties databaseTypeMappings = CommonConstants.getDefaultDatabaseTypeMappings();
|
||||
|
||||
@Autowired
|
||||
protected ResourceLoader resourceLoader;
|
||||
|
||||
/**
|
||||
* Primary 必须加此注解,不然报错,下一个类则不需要添加,表示这个数据源是默认数据源
|
||||
* ConfigurationProperties(prefix)值必须是application.properteis中对应属性的前缀
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "baseDataSource")
|
||||
@Primary
|
||||
@ConfigurationProperties(prefix = "spring.datasource")
|
||||
public DataSource baseDataSource() {
|
||||
return DataSourceBuilder.create().build();
|
||||
}
|
||||
|
||||
/**
|
||||
* a、SqlSessionFactory 一旦被创建就应该在应用的运行期间一直存在,没有任何理由对它进行清除或重建。
|
||||
* b、使用 SqlSessionFactory 的最佳实践是在应用运行期间不要重复创建多次,多次重建 SqlSessionFactory 被视为一种代码“坏味道(bad smell)”。
|
||||
* c、因此 SqlSessionFactory 的最佳作用域是应用作用域。有很多方法可以做到,最简单的就是使用单例模式或者静态单例模式。
|
||||
*
|
||||
* @param dataSource
|
||||
* @return
|
||||
*/
|
||||
@Primary
|
||||
@Bean(name = "baseSqlSessionFactory")
|
||||
public SqlSessionFactory baseSqlSessionFactory(@Qualifier("baseDataSource") DataSource dataSource) {
|
||||
MybatisSqlSessionFactoryBean sqlSessionFactoryBean = new MybatisSqlSessionFactoryBean();
|
||||
|
||||
sqlSessionFactoryBean.setDataSource(dataSource);
|
||||
String databaseType = this.initDatabaseType(dataSource);
|
||||
if (databaseType == null) {
|
||||
throw new CustomException("couldn't deduct database type");
|
||||
} else {
|
||||
try {
|
||||
// 添加XML目录
|
||||
sqlSessionFactoryBean.setMapperLocations(resolveMapperLocations());
|
||||
sqlSessionFactoryBean.afterPropertiesSet();
|
||||
return sqlSessionFactoryBean.getObject();
|
||||
} catch (Exception var5) {
|
||||
throw new CustomException("Could not create sqlSessionFactory", var5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Resource[] resolveMapperLocations() {
|
||||
ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
|
||||
List<String> mapperLocations = new ArrayList<>();
|
||||
mapperLocations.add("classpath*:mapper/**/*.xml");
|
||||
List<Resource> resources = new ArrayList();
|
||||
if (!CollectionUtils.isEmpty(mapperLocations)) {
|
||||
for (String mapperLocation : mapperLocations) {
|
||||
try {
|
||||
Resource[] mappers = resourceResolver.getResources(mapperLocation);
|
||||
resources.addAll(Arrays.asList(mappers));
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Get myBatis resources happened exception", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return resources.toArray(new Resource[resources.size()]);
|
||||
}
|
||||
|
||||
@Primary
|
||||
@Bean(name = "transactionManager")
|
||||
public PlatformTransactionManager transactionManager(@Qualifier("baseDataSource") DataSource dataSourceOne) {
|
||||
return new DataSourceTransactionManager(dataSourceOne);
|
||||
}
|
||||
|
||||
@Primary
|
||||
@Bean(name = "sqlSessionTemplate")
|
||||
public SqlSessionTemplate sqlSessionTemplate(@Qualifier("baseSqlSessionFactory") SqlSessionFactory sqlSessionFactory) {
|
||||
// 使用上面配置的Factory
|
||||
return new SqlSessionTemplate(sqlSessionFactory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*
|
||||
* @param dataSource
|
||||
* @return
|
||||
*/
|
||||
protected String initDatabaseType(@Qualifier("baseDataSource") DataSource dataSource) {
|
||||
String databaseType = null;
|
||||
Connection connection = null;
|
||||
|
||||
try {
|
||||
connection = dataSource.getConnection();
|
||||
DatabaseMetaData databaseMetaData = connection.getMetaData();
|
||||
String databaseProductName = databaseMetaData.getDatabaseProductName();
|
||||
LOGGER.info("database product name: '{}'", databaseProductName);
|
||||
databaseType = databaseTypeMappings.getProperty(databaseProductName);
|
||||
if (databaseType == null) {
|
||||
throw new CustomException("couldn't deduct database type from database product name '" + databaseProductName + "'");
|
||||
}
|
||||
|
||||
LOGGER.info("using database type: {}", databaseType);
|
||||
} catch (SQLException var14) {
|
||||
LOGGER.error("Exception while initializing Database connection", var14);
|
||||
} finally {
|
||||
try {
|
||||
if (connection != null) {
|
||||
connection.close();
|
||||
}
|
||||
} catch (SQLException var13) {
|
||||
LOGGER.error("Exception while closing the Database connection", var13);
|
||||
}
|
||||
|
||||
}
|
||||
databaseType = ("dm".equals(databaseType)) ? "oracle" : databaseType;
|
||||
return databaseType;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/**
|
||||
* _ooOoo_
|
||||
* o8888888o
|
||||
* 88" . "88
|
||||
* (| -_- |)
|
||||
* O\ = /O
|
||||
* ____/`---'\____
|
||||
* .' \\| |// `.
|
||||
* / \\||| : |||// \
|
||||
* / _||||| -:- |||||- \
|
||||
* | | \\\ - /// | |
|
||||
* | \_| ''\---/'' | |
|
||||
* \ .-\__ `-` ___/-. /
|
||||
* ___`. .' /--.--\ `. . __
|
||||
* ."" '< `.___\_<|>_/___.' >'"".
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | |
|
||||
* \ \ `-. \_ __\ /__ _/ .-` / /
|
||||
* ======`-.____`-.___\_____/___.-`____.-'======
|
||||
* `=---='
|
||||
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
* 佛祖保佑 永无BUG
|
||||
* 佛曰:
|
||||
* 写字楼里写字间,写字间里程序员;
|
||||
* 程序人员写程序,又拿程序换酒钱。
|
||||
* 酒醒只在网上坐,酒醉还来网下眠;
|
||||
* 酒醉酒醒日复日,网上网下年复年。
|
||||
* 但愿老死电脑间,不愿鞠躬老板前;
|
||||
* 奔驰宝马贵者趣,公交自行程序员。
|
||||
* 别人笑我忒疯癫,我笑自己命太贱;
|
||||
* 不见满街漂亮妹,哪个归得程序员?
|
||||
* :: springboot 2.x
|
||||
* :: Skyeye系列框架,作者:卫志强
|
||||
* :: 作者独家专属,未购买禁止私自使用
|
||||
* 启动:nohup java -jar -Dspring.cloud.nacos.discovery.server-addr=localhost:9000 -Dspring.cloud.nacos.config.server-addr=localhost:9000 -Dspring.profiles.active=dev jobdiary-web.jar >> /opt/service/project/nohup-jobdiary.out 2>&1 &
|
||||
* 清空日志:cat /dev/null > xxx-web.out
|
||||
*/
|
|
@ -1,38 +0,0 @@
|
|||
|
||||
server:
|
||||
port: 8098
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: skyeye-jobdiary-${spring.profiles.active} # 服务名
|
||||
profiles:
|
||||
active: public
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: localhost:9000 # 配置服务注册nacos地址
|
||||
namespace: ${spring.profiles.active} # 配置命名空间
|
||||
service: ${spring.application.name} # 配置服务名
|
||||
config:
|
||||
# 指定nacos server的地址
|
||||
server-addr: localhost:9000
|
||||
# 配置文件后缀
|
||||
file-extension: yml
|
||||
# 命名空间 常用场景之一是不同环境的配置的区分隔离,例如开发测试环境和生产环境的资源(如配置、服务)隔离等
|
||||
namespace: ${spring.profiles.active} # 配置命名空间
|
||||
# 支持多个共享 Data Id 的配置,优先级小于ext-config,自定义 Data Id 配置 属性是个集合,内部由 Config POJO 组成。Config 有 3 个属性,分别是 dataId, group 以及 refresh
|
||||
ext-config:
|
||||
- data-id: skyeye-common.yml # 配置文件名-Data Id
|
||||
group: DEFAULT_GROUP # 默认为DEFAULT_GROUP
|
||||
refresh: false # 是否动态刷新,默认为false
|
||||
logging:
|
||||
level:
|
||||
com.skyeye: debug
|
||||
|
||||
feign:
|
||||
client:
|
||||
config:
|
||||
# 全局配置
|
||||
default:
|
||||
loggerLevel: FULL
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
### set log levels这里的INFO,Stdout,D,E可以理解为变量,也可以说是输出平台,在下面我们可以看到 ###
|
||||
log4j.rootLogger = INFO, C, D, E
|
||||
|
||||
### console控制台输出 ###
|
||||
log4j.appender.C = org.apache.log4j.ConsoleAppender
|
||||
### System.out也就是输出 out输出是黑色字体,err输出的字体是红色 ###
|
||||
log4j.appender.C.Target = System.out
|
||||
### layout是指布局,也就是说输出日志信息的格式样式,在这里我们使用的是log4j提供的 ###
|
||||
log4j.appender.C.layout = org.apache.log4j.PatternLayout
|
||||
### 这里就是指定我们日志文件以哪一种格式去输出 ###
|
||||
log4j.appender.C.layout.ConversionPattern = [skyeye-promote][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
|
||||
|
||||
|
||||
### log file INFO级别输出日志文件 ###
|
||||
log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
|
||||
### 指定日志输出位置 ###
|
||||
log4j.appender.D.File = ../logs/skyeye.log
|
||||
### 这个的意思是指是追加还是覆盖 默认是 true true是追加 false是覆盖 ###
|
||||
log4j.appender.D.Append = true
|
||||
### 这个是指日志输出的级别在这里指定的是 INFO级别 ###
|
||||
log4j.appender.D.Threshold = INFO
|
||||
### layout是指布局,也就是说输出日志信息的格式样式,在这里我们使用的是log4j提供的 ###
|
||||
log4j.appender.D.layout = org.apache.log4j.PatternLayout
|
||||
### 这里就是指定我们日志文件以哪一种格式去输出 ###
|
||||
log4j.appender.D.layout.ConversionPattern = [skyeye-promote][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
|
||||
|
||||
|
||||
### exception ERROR级别输出日志文件 ###
|
||||
#这个跟上面一样 只不过是日志级别是 ERROR级的,方便我们直接查看系统异常信息
|
||||
log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.E.File = ../logs/skyeye_error.log
|
||||
log4j.appender.E.Append = true
|
||||
log4j.appender.E.Threshold = ERROR
|
||||
log4j.appender.E.layout = org.apache.log4j.PatternLayout
|
||||
log4j.appender.E.layout.ConversionPattern = [skyeye-promote][%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
|
||||
|
||||
#localhost日志文件输出级别为INFO
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
|
||||
#localhost日志文件输出处理类2localhost.org.apache.juli.FileHandler
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
|
||||
|
||||
#manager日志文件输出级别为INFO
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
|
||||
#manager日志文件输出处理类3manager.org.apache.juli.FileHandler
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
|
||||
|
||||
#host-manager日志文件输出级别为INFO
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
|
||||
#host-manager日志文件输出处理类4host-manager.org.apache.juli.FileHandler
|
||||
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
|
||||
|
||||
#设置包名的输出级别
|
||||
log4j.logger.com.skyeye.common.filter=info, database
|
||||
# 记录日志至数据库
|
||||
# 这里定义了数据源
|
||||
log4j.appender.database=org.apache.log4j.jdbc.JDBCAppender
|
||||
log4j.appender.database.driver=com.mysql.jdbc.Driver
|
||||
# BufferSize就是每次缓存多少条数据然后插入数据库,为了演示这里设置为1
|
||||
log4j.appender.database.BufferSize=1
|
||||
# 数据库连接池
|
||||
# 设置要将日志插入到数据库的驱动
|
||||
log4j.appender.database.Threshold=info
|
||||
log4j.appender.database.URL=${jdbc.database.path}
|
||||
log4j.appender.database.user=${jdbc.database.username}
|
||||
log4j.appender.database.password=${jdbc.database.password}
|
||||
# 看名字也该明白这里是定义Sql语句的啦
|
||||
log4j.appender.database.sql=insert into sys_work_log (id, class, mothod, create_time, log_level, log_line, message, user_name, file_name, real_path, req_ip) values (REPLACE(UUID(), '-', ''), '%C', '%M', '%d{yyyy-MM-dd HH:mm:ss}', '%p', '%l', '%m', '%X{userName}', '%F', '%X{realPath}', '%X{ip}')
|
||||
log4j.appender.database.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>skyeye-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.skyeye</groupId>
|
||||
<artifactId>skyeye-jobdiary</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>jobdiary-common</module>
|
||||
<module>jobdiary-entity</module>
|
||||
<module>jobdiary-pro</module>
|
||||
<module>jobdiary-web</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
Loading…
Reference in a new issue