forked from github/dataease
perf: 升级版本号
This commit is contained in:
parent
03498c9088
commit
246765d989
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 0d5c846bffb10aaaf57253d09912bbbff1401fe2
|
||||
Subproject commit 21e8e6225de2d4cd0bfb32442098de82f0c23aa1
|
@ -18,21 +18,12 @@
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--<dependency>
|
||||
<groupId>io.dataease</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>-->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.dataease</groupId>
|
||||
|
@ -1,16 +1,12 @@
|
||||
package io.dataease.utils;
|
||||
|
||||
import io.dataease.constant.AuthConstant;
|
||||
import io.dataease.result.ResultMessage;
|
||||
import jakarta.servlet.ServletOutputStream;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class ServletUtils {
|
||||
|
||||
public static HttpServletRequest request() {
|
||||
@ -38,6 +34,7 @@ public class ServletUtils {
|
||||
public static String getXUserinfo() {
|
||||
return getHead(AuthConstant.OIDC_X_USER);
|
||||
}
|
||||
|
||||
public static String getCasUser() {
|
||||
return getHead(AuthConstant.CAS_X_USER);
|
||||
}
|
||||
@ -46,25 +43,5 @@ public class ServletUtils {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void writeResult(ResultMessage resultMessage) {
|
||||
HttpServletResponse response = response();
|
||||
if (ObjectUtils.isEmpty(response)) return;
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/json; charset=utf-8");
|
||||
ServletOutputStream outputStream = null;
|
||||
try {
|
||||
outputStream = response.getOutputStream();
|
||||
outputStream.print(JsonUtil.toJSONString(resultMessage).toString());
|
||||
} catch (IOException ex) {
|
||||
LogUtil.error(ex.getMessage());
|
||||
} finally {
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user