Skip to content

Commit

Permalink
feat:修改注释,以及zlt-web的父级依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
zlt2000 committed Mar 4, 2023
1 parent 337fda8 commit 233ab19
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 51 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@
<!-- 业务 -->
<module>zlt-business</module>
<!-- 前端 -->
<!--<module>zlt-web</module>-->
<module>zlt-web</module>
<!-- 任务 -->
<module>zlt-job</module>
<!-- 监控 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
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;
Expand Down Expand Up @@ -66,4 +68,14 @@ public static SysUser getCurrentUser(HttpServletRequest request, boolean isFull)
}
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;
}
}
3 changes: 1 addition & 2 deletions zlt-web/layui-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
<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>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.5.14</version>
</dependency>

<!--<dependency>
Expand Down
45 changes: 5 additions & 40 deletions zlt-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 3 additions & 3 deletions zlt-web/react-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -22,7 +22,7 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<!--<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
Expand Down Expand Up @@ -120,6 +120,6 @@
</plugins>
</build>
</profile>
</profiles>
</profiles>-->

</project>

0 comments on commit 233ab19

Please sign in to comment.