提交 233ab192 编写于 作者: zlt2000's avatar zlt2000

feat:修改注释,以及zlt-web的父级依赖

上级 337fda84
......@@ -489,7 +489,7 @@
<!-- 业务 -->
<module>zlt-business</module>
<!-- 前端 -->
<!--<module>zlt-web</module>-->
<module>zlt-web</module>
<!-- 任务 -->
<module>zlt-job</module>
<!-- 监控 -->
......
......@@ -32,26 +32,26 @@ public class DataScopeProperties {
*/
private Boolean enabledSqlDebug = Boolean.FALSE;
/**
* 在includeTables的匹配符中过滤某几个表不需要权限的,仅enabled=true
* 配置那些表不执行权限控制
*/
private Set<String> ignoreTables = Collections.emptySet();
/**
* 指定某几条sql不执行权限控制, 仅enabled=true生效
* 指定那些sql不执行权限控制
*/
private Set<String> ignoreSqls = INGORE_SQL_ID;
/**
* 指定某几个表接受权限控制,仅enabled=true,默认当开启时全部表
* 配置那些表执行数据权限控制,默认是*则表示全部
*/
private Set<String> includeTables = Collections.singleton("*");
/**
* 指定某几条sql执行权限控制,仅enabled=true生效
* 指定那些sql执行数据权限控制
* 1. 为空时:所有sql都添加权限控制
* 2. 有值时:只有配置的sql添加权限控制
*/
private Set<String> includeSqls = Collections.emptySet();
/**
* 指定需要的字段名
* 指定创建人id的字段名
*/
private String creatorIdColumnName = "creator_id";
......
......@@ -8,6 +8,8 @@ import com.central.common.model.SysUser;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
......@@ -66,4 +68,14 @@ public class LoginUserUtils {
}
return user;
}
public static SysUser getCurrentUser(boolean isFull) {
// 从请求上下文里获取 Request 对象
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest contextRequest = requestAttributes.getRequest();
if (contextRequest != null) {
return LoginUserUtils.getCurrentUser(contextRequest, isFull);
}
return null;
}
}
......@@ -6,7 +6,7 @@
<parent>
<groupId>com.zlt</groupId>
<artifactId>zlt-web</artifactId>
<version>5.4.0</version>
<version>5.5.0</version>
</parent>
<artifactId>layui-web</artifactId>
<description>Layui开发的前端</description>
......@@ -14,7 +14,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.5.14</version>
</dependency>
<!--<dependency>
......
......@@ -3,50 +3,15 @@
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>
<groupId>com.zlt</groupId>
<parent>
<groupId>com.zlt</groupId>
<artifactId>central-platform</artifactId>
<version>5.5.0</version>
</parent>
<artifactId>zlt-web</artifactId>
<version>5.4.0</version>
<description>前端</description>
<packaging>pom</packaging>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>8</java.version>
<spring-boot-dependencies.version>2.5.14</spring-boot-dependencies.version>
<docker-maven-plugin.version>1.2.2</docker-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot-dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot-dependencies.version}</version>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<!-- Layui开发的前端 -->
<module>layui-web</module>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>zlt-web</artifactId>
<groupId>com.zlt</groupId>
<version>5.4.0</version>
<version>5.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......@@ -22,7 +22,7 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<!--<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
......@@ -120,6 +120,6 @@
</plugins>
</build>
</profile>
</profiles>
</profiles>-->
</project>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册