Compare commits
2
Commits
8cb328a4d1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16c47210b7 | ||
|
|
4861608c4e |
Generated
+15
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GitToolBoxProjectSettings">
|
||||||
|
<option name="commitMessageIssueKeyValidationOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
<option name="commitMessageValidationEnabledOverride">
|
||||||
|
<BoolValueOverride>
|
||||||
|
<option name="enabled" value="true" />
|
||||||
|
</BoolValueOverride>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+13
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Kotlin2JsCompilerArguments">
|
||||||
|
<option name="moduleKind" value="plain" />
|
||||||
|
</component>
|
||||||
|
<component name="Kotlin2JvmCompilerArguments">
|
||||||
|
<option name="jvmTarget" value="15" />
|
||||||
|
</component>
|
||||||
|
<component name="KotlinCommonCompilerArguments">
|
||||||
|
<option name="apiVersion" value="2.1" />
|
||||||
|
<option name="languageVersion" value="2.1" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Generated
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
<component name="PDMPlugin">
|
<component name="PDMPlugin">
|
||||||
<option name="skipTestSources" value="false" />
|
<option name="skipTestSources" value="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_15" default="true" project-jdk-name="15" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_15_PREVIEW" project-jdk-name="adopt-15" project-jdk-type="JavaSDK" />
|
||||||
<component name="SvnBranchConfigurationManager">
|
<component name="SvnBranchConfigurationManager">
|
||||||
<option name="myConfigurationMap">
|
<option name="myConfigurationMap">
|
||||||
<map>
|
<map>
|
||||||
|
|||||||
Generated
+53
-2727
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,164 @@
|
|||||||
|
<?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/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>io.v</groupId>
|
||||||
|
<artifactId>mini</artifactId>
|
||||||
|
<version>5.3.0</version>
|
||||||
|
<description>java web development framework, base on budwk and nutz</description>
|
||||||
|
<url>https://budwk.com</url>
|
||||||
|
<developers>
|
||||||
|
<developer>
|
||||||
|
<id>wizzercn</id>
|
||||||
|
<name>Wizzer</name>
|
||||||
|
<email>wizzer@qq.com</email>
|
||||||
|
<url>https://wizzer.cn</url>
|
||||||
|
</developer>
|
||||||
|
</developers>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.7.0</version>
|
||||||
|
<configuration>
|
||||||
|
<source>15</source>
|
||||||
|
<target>15</target>
|
||||||
|
<compilerArgs>--enable-preview</compilerArgs>
|
||||||
|
<useIncrementalCompilation>false</useIncrementalCompilation>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<charset>UTF-8</charset>
|
||||||
|
<docencoding>UTF-8</docencoding>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<attach>true</attach>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>2.22.0</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.nutz.boot</groupId>
|
||||||
|
<artifactId>nutzboot-maven-plugin</artifactId>
|
||||||
|
<version>${nutzboot.version}</version>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<source>15</source>
|
||||||
|
<target>15</target>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>nutz</id>
|
||||||
|
<url>https://jfrog.nutz.cn/artifactory/libs-release</url>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<releases>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<updatePolicy>always</updatePolicy>
|
||||||
|
</snapshots>
|
||||||
|
<id>nutz-snapshots</id>
|
||||||
|
<url>https://jfrog.nutz.cn/artifactory/snapshots</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<releases>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<updatePolicy>always</updatePolicy>
|
||||||
|
</snapshots>
|
||||||
|
<id>nutz-snapshots</id>
|
||||||
|
<url>https://jfrog.nutz.cn/artifactory/snapshots</url>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.nutz</groupId>
|
||||||
|
<artifactId>nutzboot-starter-test-junit4</artifactId>
|
||||||
|
<version>2.4.2-SNAPSHOT</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>4.13.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>hamcrest-core</artifactId>
|
||||||
|
<groupId>org.hamcrest</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.nutz</groupId>
|
||||||
|
<artifactId>nutzboot-parent</artifactId>
|
||||||
|
<version>${nutzboot.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml.bind</groupId>
|
||||||
|
<artifactId>jaxb-api</artifactId>
|
||||||
|
<version>${jaxb-api.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
<properties>
|
||||||
|
<jsoup.veision>1.12.1</jsoup.veision>
|
||||||
|
<mysql-connector-java.version>8.0.16</mysql-connector-java.version>
|
||||||
|
<easy-captcha.version>1.6.2</easy-captcha.version>
|
||||||
|
<emoji-java.veision>4.0.0</emoji-java.veision>
|
||||||
|
<jaxb-api.version>2.3.1</jaxb-api.version>
|
||||||
|
<lombok.version>1.18.12</lombok.version>
|
||||||
|
<slf4j.version>1.7.30</slf4j.version>
|
||||||
|
<poi.version>4.1.2</poi.version>
|
||||||
|
<v.version>1.0.1</v.version>
|
||||||
|
<commons-lang3.version>3.8.1</commons-lang3.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<pinyin4j.veision>2.5.1</pinyin4j.veision>
|
||||||
|
<nutzboot.version>2.4.2-SNAPSHOT</nutzboot.version>
|
||||||
|
<logback.version>1.2.3</logback.version>
|
||||||
|
<nutz.version>1.r.68-SNAPSHOT</nutz.version>
|
||||||
|
<tencentcloud-sdk-java.version>4.0.11</tencentcloud-sdk-java.version>
|
||||||
|
</properties>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package io.v.nutz.web.commons.ext.beetl;
|
||||||
|
|
||||||
|
import org.beetl.core.Resource;
|
||||||
|
import org.beetl.core.misc.BeetlUtil;
|
||||||
|
import org.beetl.core.resource.ClasspathResource;
|
||||||
|
import org.beetl.core.resource.ClasspathResourceLoader;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class BeetlCustomResourceLoader extends ClasspathResourceLoader {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Resource getResource(String key) {
|
||||||
|
Resource resource = new ClasspathResource(key, this.getChildPath(super.getRoot(), key), this);
|
||||||
|
return resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getResourceId(Resource resource, String id) {
|
||||||
|
// return resource == null ? id : BeetlUtil.getRelPath(resource.getId(), id);
|
||||||
|
return getRelPath(resource.getId(), id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增加判断相对路径
|
||||||
|
* 光见鬼
|
||||||
|
*/
|
||||||
|
private String getRelPath(String siblings, String resourceId) {
|
||||||
|
// 参数校验
|
||||||
|
if (resourceId == null || resourceId.isEmpty()) {
|
||||||
|
throw new RuntimeException("资源ID为空,参数错");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果是绝对路径,直接返回(以 / 或 \ 开头)
|
||||||
|
if (resourceId.charAt(0) == '\\' || resourceId.charAt(0) == '/') {
|
||||||
|
if (BeetlUtil.isOutsideOfRoot(resourceId)) {
|
||||||
|
throw new RuntimeException("不能访问外部文件或者模板");
|
||||||
|
}
|
||||||
|
return resourceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理相对路径
|
||||||
|
String baseDir = siblings;
|
||||||
|
// 如果siblings是文件路径,获取其所在目录
|
||||||
|
int lastSeparatorIndex = Math.max(siblings.lastIndexOf('/'), siblings.lastIndexOf('\\'));
|
||||||
|
if (lastSeparatorIndex > 0) {
|
||||||
|
baseDir = siblings.substring(0, lastSeparatorIndex + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分割路径
|
||||||
|
String[] parts = resourceId.replace('\\', '/').split("/");
|
||||||
|
List<String> baseParts = new ArrayList<>(
|
||||||
|
Arrays.asList(baseDir.replace('\\', '/').split("/"))
|
||||||
|
);
|
||||||
|
baseParts.removeIf(String::isEmpty);
|
||||||
|
|
||||||
|
// 处理 ../ 和 ./
|
||||||
|
for (String part : parts) {
|
||||||
|
if ("..".equals(part)) {
|
||||||
|
if (!baseParts.isEmpty()) {
|
||||||
|
baseParts.remove(baseParts.size() - 1);
|
||||||
|
}
|
||||||
|
} else if (!".".equals(part) && !part.isEmpty()) {
|
||||||
|
baseParts.add(part);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 组合最终路径
|
||||||
|
String result = "/" + String.join("/", baseParts);
|
||||||
|
|
||||||
|
// 检查是否访问外部文件
|
||||||
|
if (BeetlUtil.isOutsideOfRoot(result)) {
|
||||||
|
throw new RuntimeException("不能访问外部文件或者模板");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -78,7 +78,7 @@ public class NutShiroProcessor extends AbstractProcessor {
|
|||||||
//不需要认证授权的url
|
//不需要认证授权的url
|
||||||
String[] authIgnoreUrlArr = Lang.array("/",
|
String[] authIgnoreUrlArr = Lang.array("/",
|
||||||
"/sso/login",
|
"/sso/login",
|
||||||
// "/platform/login",
|
"/platform/login",
|
||||||
"/platform/login(/doLogin|/logout|/captcha)",
|
"/platform/login(/doLogin|/logout|/captcha)",
|
||||||
"/platform/qywechat/.*",
|
"/platform/qywechat/.*",
|
||||||
"/platform/home/(500|403|404|UnknownAccountError|LockedAccountError)",
|
"/platform/home/(500|403|404|UnknownAccountError|LockedAccountError)",
|
||||||
|
|||||||
@@ -54,7 +54,9 @@ layout("/layouts/platform.html"){
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="pull-right offscreen-right mt5">
|
<div class="pull-right offscreen-right mt5">
|
||||||
|
<!-- 保留原有批量处理入口的禁用状态,本次仅开放人员数据拉取按钮。 -->
|
||||||
|
<!--
|
||||||
<div class="btn-group tool-button">
|
<div class="btn-group tool-button">
|
||||||
<el-button type="primary" @click="transUnit2">全部设为二级单位
|
<el-button type="primary" @click="transUnit2">全部设为二级单位
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -63,12 +65,13 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button icon="el-icon-delete" type="danger" :loading="delLoading" @click="doDeleteUsers">删除
|
<el-button icon="el-icon-delete" type="danger" :loading="delLoading" @click="doDeleteUsers">删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
<div class="btn-group tool-button">
|
<div class="btn-group tool-button">
|
||||||
<el-button type="primary" :loading="pullLoading" @click="pull">
|
<el-button type="primary" :loading="pullLoading" @click="pull">
|
||||||
拉取<i class="el-icon-download"></i>
|
拉取<i class="el-icon-download"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>-->
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card shadow="never" class="mt20">
|
<el-card shadow="never" class="mt20">
|
||||||
|
|||||||
@@ -67,14 +67,14 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||||
<span style="color: red">温馨提示:自己维护数据</span>
|
<span style="color: red">温馨提示:自己维护数据</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="pull-right offscreen-right">
|
<div class="pull-right offscreen-right">
|
||||||
<div class="btn-group tool-button">
|
<div class="btn-group tool-button">
|
||||||
<el-button slot="reference" icon="el-icon-refresh" type="primary"
|
<el-button slot="reference" icon="el-icon-refresh" type="primary"
|
||||||
@click="checkSource" :loading="updateLoading">
|
@click="checkSource" :loading="updateLoading">
|
||||||
更新
|
更新
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>-->
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user