初始提交
This commit is contained in:
commit
5caf20ef40
117
.gitignore
vendored
Normal file
117
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
# ---> Java
|
||||
*.eclipse.*
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
# ---> JetBrains
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
.idea
|
||||
*.iml
|
||||
/classes/META-INF/
|
||||
target/classes/application-dev.properties
|
||||
target/classes/application-prod.properties
|
||||
target/classes/com/platform/attendance/mapper/CheckInRecordMapper.xml
|
||||
target/classes/com/platform/projects/mapper/ProjectInfoMapper.xml
|
||||
target/classes/com/platform/projects/mapper/ProjectTaskMapper.xml
|
||||
target/classes/com/platform/projects/mapper/ProjectUserMapper.xml
|
||||
target/classes/com/platform/system/mapper/SysOperationLogMapper.xml
|
||||
target/classes/com/platform/system/mapper/SysRoleMapper.xml
|
||||
target/classes/com/platform/system/mapper/SysUserMapper.xml
|
||||
target/generated-sources/target
|
||||
/.classpath
|
||||
/.factorypath
|
||||
/.project
|
||||
/target/
|
||||
/log/
|
||||
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#基于jdk8镜像进行构建,创建的镜像已经配置好java环境
|
||||
FROM openjdk:8
|
||||
|
||||
#上述的pom中配置的JAR_FILE将会传入到该参数
|
||||
#也可以在这里直接配置 ARG JAR_FILE=/target/web-1.0.jar
|
||||
#用于配置spingboot应用maven打包生成的jar文件
|
||||
ARG JAR_FILE
|
||||
|
||||
#在镜像中创建一个工作目录
|
||||
RUN mkdir /worker
|
||||
|
||||
#将jar文件复制到工作目录中
|
||||
add ${JAR_FILE} /worker
|
||||
|
||||
#暴露镜像的端口8452,其他端口不开放
|
||||
expose 8089
|
||||
|
||||
#镜像启动时执行的命令,配置多条仅执行最后一条
|
||||
#这里配置启动jar文件: java -jar /worker/web-1.0.jar
|
||||
entrypoint ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/springbootmybatis-1.0.jar"]
|
||||
# entrypoint ["java","-jar","/worker/springbootmybatis-1.0.jar"]
|
||||
85
README.md
Normal file
85
README.md
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
# platform Boot是一款基于Springboot的基础开发平台!
|
||||
## 功能包括:行政区域管理、用户管理、部门管理、角色权限控制、Redis缓存管理、操作日志管理、数据字典管理、菜单管理等功能
|
||||
|
||||
|
||||
### 适用项目
|
||||
#### 可以应用在任何J2EE项目的开发中,适合企业信息管理系统、内部办公系统、客户管理系统等。
|
||||
|
||||
####
|
||||
#### <font color=red>该程序代码会自动创建更新数据库表接口,不要手动更改数据库表结构信息。</font>
|
||||
|
||||
###执行步骤
|
||||
####1、初始化pom文件
|
||||
|
||||
####2、修改配置文件,主要修改数据库连接串、数据库账户、数据库密码、redis配置、服务端口号。
|
||||
|
||||
####3、手动创建数据库,字符集选择"utf-8",排序规则选择”utf8_general_ci“
|
||||
|
||||
####4、编译代码
|
||||
|
||||
####5、手动执行目录 resources/sql/base_sys_menu.sql 数据库脚本,初始化菜单;
|
||||
|
||||
####6、启动项目,<font color=red>自动生成管理员账户、角色信息;</font>
|
||||
|
||||
####7、打开浏览器,http://localhost:port/swagger-ui/index.html,<font color=red>swagger接口调试工具</font>
|
||||
|
||||
|
||||
|
||||
### 模型数据注解参考网站:
|
||||
https://www.yuque.com/sunchenbin/actable/olgtiz
|
||||
|
||||
#### 开发环境使用application-dev.properties 配置文件
|
||||
#### 测试环境使用application-prod.properties 配置文件
|
||||
#### 第一次从git拉取下的代码,需要手动切换到开发环境配置,修改文件application.properties
|
||||
|
||||
#spring.profiles.active=prod
|
||||
spring.profiles.active=dev
|
||||
|
||||
### 添加Swagger
|
||||
#### 打开 common->config->SwaggerConfig 文件,参考增加
|
||||
@Bean
|
||||
public Docket createSystemRestApi() {
|
||||
return createRestApi("com.platform.system.controller", "系统管理");
|
||||
}
|
||||
|
||||
### 权限控制
|
||||
#### 打开Controller 文件,在接口上增加 @PreAuthorize
|
||||
“pro:sys:menu:add“ 为菜单权限码
|
||||
|
||||
@PostMapping("/add")
|
||||
@PreAuthorize("@Permission.hasPermi('pro:sys:menu:add')")
|
||||
@AutoLog(value = "新增菜单", operationType = OperationTypeEnum.INSERT, module = "系统管理/菜单管理")
|
||||
public boolean add(@RequestBody SysMenuCreateInputVo inputVo) {
|
||||
return menuService.create(inputVo);
|
||||
}
|
||||
|
||||
### 操作日志
|
||||
#### 打开Controller 文件,在接口上增加 @AutoLog
|
||||
|
||||
@DeleteMapping("/remove")
|
||||
@PreAuthorize("@Permission.hasPermi('pro:sys:dic:remove')")
|
||||
@AutoLog(value = "删除字典数据", level = 9, operationType = OperationTypeEnum.DELETE, module = "系统管理/字典管理")
|
||||
public boolean remove(String key) {
|
||||
return dataService.remove(key);
|
||||
}
|
||||
|
||||
### 分页
|
||||
#### Vo 继承 SearchInputVo
|
||||
####
|
||||
|
||||
### 缓存数据转化,支持用户信息、角色信息、部门信息、字典信息转化
|
||||
@CacheFormat(key = "createUserId", cacheType = CacheFormatEnum.USER)
|
||||
|
||||
|
||||
### 数据权限,支持所有、按所属部门、按自定义部门、按自定义人员查询;
|
||||
@CustomDataPermission(operation = OperationTypeEnum.SELECT, perm = "sys:base:user")
|
||||
### 数据权限,需要升级
|
||||
<dependency>
|
||||
<groupId>com.gitee.sunchenbin.mybatis.actable</groupId>
|
||||
<artifactId>mybatis-enhance-actable</artifactId>
|
||||
<version>1.5.0.RELEASE</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
#### TODO 待续
|
||||
0
doc/数据权限控制.docx
Normal file
0
doc/数据权限控制.docx
Normal file
Loading…
Reference in New Issue
Block a user