This commit is contained in:
2023-06-24 21:23:17 +08:00
parent ee2c4eb3ba
commit 3fd3a09888
12 changed files with 156 additions and 8 deletions

View File

@ -59,6 +59,11 @@ public class BaseConstant {
*/
public static final String RESOURCE_PREFIX = "/resource";
/**
* 资源映射路径 正则
*/
public static final String RESOURCE_PATTERN = RESOURCE_PREFIX + "/**";
/**
* 是
*/

View File

@ -12,10 +12,10 @@
<artifactId>qiaoba-common-redis</artifactId>
<dependencies>
<!-- redis -->
<!-- lock4j -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<groupId>com.baomidou</groupId>
<artifactId>lock4j-redis-template-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.qiaoba</groupId>

View File

@ -1,5 +1,7 @@
package com.qiaoba.common.web.utils;
import cn.hutool.http.ContentType;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.qiaoba.common.base.result.AjaxResult;
@ -18,7 +20,7 @@ public class ResponseUtil {
public static void response(HttpServletResponse response, String msg) throws IOException {
response.setStatus(HttpServletResponse.SC_OK);
response.setContentType("text/plain; charset=UTF-8");
response.setContentType(ContentType.JSON.getValue());
PrintWriter writer = response.getWriter();
writer.write(msg);
writer.close();