test: 用户日志文件
This commit is contained in:
parent
b80208446e
commit
76285a5ba6
12
dao/pom.xml
12
dao/pom.xml
|
@ -38,16 +38,20 @@
|
|||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<!-- fastjson2 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
|
||||
<version>2.8.6</version>
|
||||
</dependency>
|
||||
<!-- 实体类注解 -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>1.6.14</version>
|
||||
</dependency>
|
||||
<!-- fastjson2 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
|
@ -18,9 +18,14 @@ public class Knife4jConfig {
|
|||
// 作者等信息
|
||||
Contact contact = new Contact().name("Bunny").email("1319900154@qq.com").url("http://bunny-web.site");
|
||||
// 使用协议
|
||||
License license = new License().name("MIT").url("https://MUT.com");
|
||||
License license = new License().name("MIT").url("https://mit-license.org");
|
||||
// 相关信息
|
||||
Info info = new Info().title("Bunny-Admin").description("权限管理模板").version("v1.0.0").contact(contact).license(license).termsOfService("MIT");
|
||||
Info info = new Info().title("Bunny-Admin")
|
||||
.contact(contact).license(license)
|
||||
.description("权限管理模板")
|
||||
.summary("Auth权限模板")
|
||||
.termsOfService("http://bunny-web.site")
|
||||
.version("v1.0.0");
|
||||
|
||||
return new OpenAPI().info(info).externalDocs(new ExternalDocumentation());
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
package cn.bunny.services.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@Configuration
|
||||
public class WebConfig {
|
||||
@Bean
|
||||
public RestTemplate restTemplate() {
|
||||
return new RestTemplate();
|
||||
}
|
||||
}
|
|
@ -8,7 +8,6 @@ import cn.bunny.services.service.configuration.ConfigurationService;
|
|||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Tag(name = "系统配置", description = "系统配置相关接口")
|
||||
|
@ -16,8 +15,11 @@ import org.springframework.web.bind.annotation.*;
|
|||
@RequestMapping("/api/config")
|
||||
public class ConfigurationController {
|
||||
|
||||
@Autowired
|
||||
private ConfigurationService configurationService;
|
||||
private final ConfigurationService configurationService;
|
||||
|
||||
public ConfigurationController(ConfigurationService configurationService) {
|
||||
this.configurationService = configurationService;
|
||||
}
|
||||
|
||||
@Operation(summary = "读取web配置文件", description = "读取web配置文件")
|
||||
@GetMapping("noAuth/webConfig")
|
||||
|
@ -38,5 +40,4 @@ public class ConfigurationController {
|
|||
configurationService.updateWebConfiguration(dto);
|
||||
return Result.success(ResultCodeEnum.UPDATE_SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
|
@ -31,32 +30,31 @@ import java.util.List;
|
|||
@RequestMapping("api/userLoginLog")
|
||||
public class UserLoginLogController {
|
||||
|
||||
@Autowired
|
||||
private UserLoginLogService userLoginLogService;
|
||||
private final UserLoginLogService userLoginLogService;
|
||||
|
||||
public UserLoginLogController(UserLoginLogService userLoginLogService) {
|
||||
this.userLoginLogService = userLoginLogService;
|
||||
}
|
||||
|
||||
@Operation(summary = "分页查询用户登录日志", description = "分页查询用户登录日志")
|
||||
@GetMapping("getUserLoginLogList/{page}/{limit}")
|
||||
public Mono<Result<PageResult<UserLoginLogVo>>> getUserLoginLogList(
|
||||
@Parameter(name = "page", description = "当前页", required = true)
|
||||
@PathVariable("page") Integer page,
|
||||
@Parameter(name = "limit", description = "每页记录数", required = true)
|
||||
@PathVariable("limit") Integer limit,
|
||||
public Result<PageResult<UserLoginLogVo>> getUserLoginLogList(
|
||||
@Parameter(name = "page", description = "当前页", required = true) @PathVariable("page") Integer page,
|
||||
@Parameter(name = "limit", description = "每页记录数", required = true) @PathVariable("limit") Integer limit,
|
||||
UserLoginLogDto dto) {
|
||||
Page<UserLoginLog> pageParams = new Page<>(page, limit);
|
||||
PageResult<UserLoginLogVo> pageResult = userLoginLogService.getUserLoginLogList(pageParams, dto);
|
||||
return Mono.just(Result.success(pageResult));
|
||||
return Result.success(pageResult);
|
||||
}
|
||||
|
||||
@Operation(summary = "获取本地用户登录日志", description = "获取本地用户登录日志")
|
||||
@GetMapping("noManage/getUserLoginLogListByLocalUser/{page}/{limit}")
|
||||
public Mono<Result<PageResult<UserLoginLogLocalVo>>> getUserLoginLogListByLocalUser(
|
||||
@Parameter(name = "page", description = "当前页", required = true)
|
||||
@PathVariable("page") Integer page,
|
||||
@Parameter(name = "limit", description = "每页记录数", required = true)
|
||||
@PathVariable("limit") Integer limit) {
|
||||
public Result<PageResult<UserLoginLogLocalVo>> getUserLoginLogListByLocalUser(
|
||||
@Parameter(name = "page", description = "当前页", required = true) @PathVariable("page") Integer page,
|
||||
@Parameter(name = "limit", description = "每页记录数", required = true) @PathVariable("limit") Integer limit) {
|
||||
Page<UserLoginLog> pageParams = new Page<>(page, limit);
|
||||
PageResult<UserLoginLogLocalVo> voPageResult = userLoginLogService.getUserLoginLogListByLocalUser(pageParams);
|
||||
return Mono.just(Result.success(voPageResult));
|
||||
return Result.success(voPageResult);
|
||||
}
|
||||
|
||||
@Operation(summary = "删除用户登录日志", description = "删除用户登录日志")
|
||||
|
|
|
@ -40,7 +40,7 @@ public class GlobalExceptionHandler {
|
|||
String message = exception.getMessage();
|
||||
message = StringUtils.hasText(message) ? message : "服务器异常";
|
||||
exception.printStackTrace();
|
||||
|
||||
|
||||
// 解析异常
|
||||
String jsonParseError = "JSON parse error (.*)";
|
||||
Matcher jsonParseErrorMatcher = Pattern.compile(jsonParseError).matcher(message);
|
||||
|
|
|
@ -30,9 +30,9 @@ public class WebSecurityConfig {
|
|||
|
||||
// 需要排出的无需验证的请求路径
|
||||
public static String[] annotations = {
|
||||
"/", "/ws/**",
|
||||
"/", "/ws/**", "/**.html",
|
||||
"/media.ico", "/favicon.ico", "/webjars/**", "/v3/api-docs/**", "/swagger-ui/**",
|
||||
"/*/*/noAuth/**", "/*/noAuth/**", "/noAuth/**",
|
||||
"/media.ico", "/favicon.ico", "*.html", "/webjars/**", "/v3/api-docs/**", "/swagger-ui/**",
|
||||
"/error", "/*/i18n/getI18n",
|
||||
};
|
||||
|
||||
|
|
|
@ -40,11 +40,12 @@ public class UserLoginLogServiceImpl extends ServiceImpl<UserLoginLogMapper, Use
|
|||
public PageResult<UserLoginLogVo> getUserLoginLogList(Page<UserLoginLog> pageParams, UserLoginLogDto dto) {
|
||||
IPage<UserLoginLogVo> page = baseMapper.selectListByPage(pageParams, dto);
|
||||
|
||||
List<UserLoginLogVo> voList = page.getRecords().stream().map(userLoginLog -> {
|
||||
UserLoginLogVo userLoginLogVo = new UserLoginLogVo();
|
||||
BeanUtils.copyProperties(userLoginLog, userLoginLogVo);
|
||||
return userLoginLogVo;
|
||||
}).toList();
|
||||
List<UserLoginLogVo> voList = page.getRecords().stream()
|
||||
.map(userLoginLog -> {
|
||||
UserLoginLogVo userLoginLogVo = new UserLoginLogVo();
|
||||
BeanUtils.copyProperties(userLoginLog, userLoginLogVo);
|
||||
return userLoginLogVo;
|
||||
}).toList();
|
||||
|
||||
return PageResult.<UserLoginLogVo>builder()
|
||||
.list(voList)
|
||||
|
@ -79,11 +80,12 @@ public class UserLoginLogServiceImpl extends ServiceImpl<UserLoginLogMapper, Use
|
|||
Long userId = BaseContext.getUserId();
|
||||
IPage<UserLoginLog> page = baseMapper.selectListByPageWithLocalUser(pageParams, userId);
|
||||
|
||||
List<UserLoginLogLocalVo> voList = page.getRecords().stream().map(userLoginLog -> {
|
||||
UserLoginLogLocalVo userLoginLogVo = new UserLoginLogLocalVo();
|
||||
BeanUtils.copyProperties(userLoginLog, userLoginLogVo);
|
||||
return userLoginLogVo;
|
||||
}).toList();
|
||||
List<UserLoginLogLocalVo> voList = page.getRecords().stream()
|
||||
.map(userLoginLog -> {
|
||||
UserLoginLogLocalVo userLoginLogVo = new UserLoginLogLocalVo();
|
||||
BeanUtils.copyProperties(userLoginLog, userLoginLogVo);
|
||||
return userLoginLogVo;
|
||||
}).toList();
|
||||
|
||||
return PageResult.<UserLoginLogLocalVo>builder()
|
||||
.list(voList)
|
||||
|
|
|
@ -5,25 +5,27 @@ import cn.bunny.services.exception.AuthCustomerException;
|
|||
import io.jsonwebtoken.Claims;
|
||||
import io.jsonwebtoken.Jws;
|
||||
import io.jsonwebtoken.Jwts;
|
||||
import io.jsonwebtoken.security.Keys;
|
||||
import io.micrometer.common.lang.Nullable;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.crypto.SecretKey;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
public class JwtHelper {
|
||||
// JWT 的 秘钥
|
||||
// static SecretKey key = new SecretKeySpec("Bunny-Java-Template".getBytes(), "AES");
|
||||
private static final SecretKey key = Keys.hmacShaKeyFor("Bunny-Auth-Server-Private-SecretKey".getBytes(StandardCharsets.UTF_8));
|
||||
// 时间 按天 计算
|
||||
private static final long tokenExpiration = 24 * 60 * 60 * 1000;
|
||||
// JWT 的 秘钥
|
||||
private static final String tokenSignKey = "Bunny-Java-Template";
|
||||
// 默认主题
|
||||
private static final String subject = "Bunny";
|
||||
// 默认时间
|
||||
private static final Date time = new Date(System.currentTimeMillis() + tokenExpiration * 7);
|
||||
static SecretKey key = Jwts.SIG.HS256.key().build();
|
||||
|
||||
/**
|
||||
* 使用默认主题,默认时间,默认秘钥,创建自定义集合token
|
||||
|
@ -324,6 +326,7 @@ public class JwtHelper {
|
|||
|
||||
return expiration != null && expiration.before(new Date());
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,15 +44,6 @@ public class UserUtil {
|
|||
private final UserLoginLogMapper userLoginLogMapper;
|
||||
private final RedisTemplate<String, Object> redisTemplate;
|
||||
|
||||
// public UserUtil(MinioUtil minioUtil, PowerMapper powerMapper, RoleMapper roleMapper, UserMapper userMapper, UserLoginLogMapper userLoginLogMapper, RedisTemplate<String, Object> redisTemplate) {
|
||||
// this.minioUtil = minioUtil;
|
||||
// this.powerMapper = powerMapper;
|
||||
// this.roleMapper = roleMapper;
|
||||
// this.userMapper = userMapper;
|
||||
// this.userLoginLogMapper = userLoginLogMapper;
|
||||
// this.redisTemplate = redisTemplate;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 构建登录用户返回对象
|
||||
*
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
server:
|
||||
port: 8000
|
||||
spring:
|
||||
profiles:
|
||||
active: @profiles.active@
|
||||
|
|
|
@ -1,66 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>400 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>400 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 400 - Bad Request</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 400 - Bad Request</h1>
|
||||
<dl>
|
||||
<dt>错误说明:因为错误的语法导致服务器无法理解请求信息。</dt>
|
||||
<dt>原因1:客户端发起的请求不符合服务器对请求的某些限制,或者请求本身存在一定的错误。</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>链接中有特殊字符或者链接长度过长导致,请对应修改.</dd>
|
||||
<dt>原因2:request header 或者 cookie 过大所引起</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>crtl+shift+delete 快捷键清除cookie.</dd>
|
||||
<dt>错误说明:因为错误的语法导致服务器无法理解请求信息。</dt>
|
||||
<dt>原因1:客户端发起的请求不符合服务器对请求的某些限制,或者请求本身存在一定的错误。</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>链接中有特殊字符或者链接长度过长导致,请对应修改.</dd>
|
||||
<dt>原因2:request header 或者 cookie 过大所引起</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>crtl+shift+delete 快捷键清除cookie.</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,66 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>403 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>403 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>403 - Forbidden 禁止访问: 访问被拒绝</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>403 - Forbidden 禁止访问: 访问被拒绝</h1>
|
||||
<dl>
|
||||
<dt>错误说明:禁止访问,服务器拒绝访问</dt>
|
||||
<dt>原因1:未找到默认的索引文件</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>IIS中【启用默认内容文档】选项中将默认打开文档修改为程序首页文件格式,如:index.html或者index.php</dd>
|
||||
<dt>原因2:文件夹安全权限导致</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>程序文件-右击-属性-安全-Users-修改为读取和执行权限</dd>
|
||||
<dt>错误说明:禁止访问,服务器拒绝访问</dt>
|
||||
<dt>原因1:未找到默认的索引文件</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>IIS中【启用默认内容文档】选项中将默认打开文档修改为程序首页文件格式,如:index.html或者index.php</dd>
|
||||
<dt>原因2:文件夹安全权限导致</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>程序文件-右击-属性-安全-Users-修改为读取和执行权限</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,75 +1,78 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>404 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 50px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>404 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 50px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>404 - Page Not Found 未找到</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>404 - Page Not Found 未找到</h1>
|
||||
<dl>
|
||||
<dt>错误说明:请求的页面不存在</dt>
|
||||
<dt>原因1:访问的文档权限不够</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>修改文件权限为755,windos系统修改目录权限为可写可读。</dd>
|
||||
<dt>原因2:防火墙的原因</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>先关闭让防火墙通过WWW服务。</dd>
|
||||
<dt>原因3:站点根目录无默认访问文件</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>在根目录中创建index.html或者创建index.php。</dd>
|
||||
<dt>原因4:站点配置目录不正确</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>将网站应用程序复制到站点目录中,或者修改站点配置目录指定到应用程序目录中。</dd>
|
||||
<dt>原因5:站点使用了伪静态</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>将伪静态规则删除,或者重新编写正确的伪静态规则,或关闭伪静态配置。</dd>
|
||||
<dt>错误说明:请求的页面不存在</dt>
|
||||
<dt>原因1:访问的文档权限不够</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>修改文件权限为755,windos系统修改目录权限为可写可读。</dd>
|
||||
<dt>原因2:防火墙的原因</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>先关闭让防火墙通过WWW服务。</dd>
|
||||
<dt>原因3:站点根目录无默认访问文件</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>在根目录中创建index.html或者创建index.php。</dd>
|
||||
<dt>原因4:站点配置目录不正确</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>将网站应用程序复制到站点目录中,或者修改站点配置目录指定到应用程序目录中。</dd>
|
||||
<dt>原因5:站点使用了伪静态</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>将伪静态规则删除,或者重新编写正确的伪静态规则,或关闭伪静态配置。</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,63 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>501 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>501 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 501 - Not Implemented</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 501 - Not Implemented</h1>
|
||||
<dl>
|
||||
<dt>错误说明:服务器没有相应的执行动作来完成当前请求。</dt>
|
||||
<dt>原因1:Web 服务器不支持实现此请求所需的功能</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>可以用来HttpWebRequest指定一个UserAgent来试试的,有时候你可以换电脑来测试一下的。</dd>
|
||||
<dt>错误说明:服务器没有相应的执行动作来完成当前请求。</dt>
|
||||
<dt>原因1:Web 服务器不支持实现此请求所需的功能</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>可以用来HttpWebRequest指定一个UserAgent来试试的,有时候你可以换电脑来测试一下的。</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,75 +1,80 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>502 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 50px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>502 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 50px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 502 - Bad Gateway 没有响应</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 502 - Bad Gateway 没有响应</h1>
|
||||
<dl>
|
||||
<dt>错误说明:坏的网关,http向后端节点请求,没有响应</dt>
|
||||
<dt>原因1:DNS 缓冲</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>在dos窗口运行 ipconfig /flushdns,该命令会刷新DNS缓冲。</dd>
|
||||
<dt>原因2:浏览器代理</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>关掉代理。</dd>
|
||||
<dt>原因3:dns 被劫持了,即使使用国外的dns,也会被劫持</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>去掉VPN服务器的DNS。切换另外的dns。在windows系统中,可以在本地网络连接的属性中,去掉默认的dns,选用国外的dns,比如google的或opendns。</dd>
|
||||
<dt>原因4:php执行超时</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>修改/usr/local/php/etc/php.ini 将max_execution_time 改为300。</dd>
|
||||
<dt>原因5:nginx等待时间超时</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>适当增加nginx.conf配置文件中FastCGI的timeout时间。</dd>
|
||||
<dt>错误说明:坏的网关,http向后端节点请求,没有响应</dt>
|
||||
<dt>原因1:DNS 缓冲</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>在dos窗口运行 ipconfig /flushdns,该命令会刷新DNS缓冲。</dd>
|
||||
<dt>原因2:浏览器代理</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>关掉代理。</dd>
|
||||
<dt>原因3:dns 被劫持了,即使使用国外的dns,也会被劫持</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>
|
||||
去掉VPN服务器的DNS。切换另外的dns。在windows系统中,可以在本地网络连接的属性中,去掉默认的dns,选用国外的dns,比如google的或opendns。
|
||||
</dd>
|
||||
<dt>原因4:php执行超时</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>修改/usr/local/php/etc/php.ini 将max_execution_time 改为300。</dd>
|
||||
<dt>原因5:nginx等待时间超时</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>适当增加nginx.conf配置文件中FastCGI的timeout时间。</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,66 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>503 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>503 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 503 - Service Unavailable 服务不可用</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 503 - Service Unavailable 服务不可用</h1>
|
||||
<dl>
|
||||
<dt>错误说明:服务当前不可用</dt>
|
||||
<dt>原因1:服务不可用状态</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>服务器或许就是正在维护或者暂停了,你可以联系一下服务器空间商。</dd>
|
||||
<dt>原因2:程序占用资源太多</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>通过设置应用程序池把账户改为NetworkService即可解决。</dd>
|
||||
<dt>错误说明:服务当前不可用</dt>
|
||||
<dt>原因1:服务不可用状态</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>服务器或许就是正在维护或者暂停了,你可以联系一下服务器空间商。</dd>
|
||||
<dt>原因2:程序占用资源太多</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>通过设置应用程序池把账户改为NetworkService即可解决。</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,69 +1,81 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>504 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 50px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>504 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 50px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 504 - Gateway Timeout 网关超时</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 504 - Gateway Timeout 网关超时</h1>
|
||||
<dl>
|
||||
<dt>错误说明:网关超时,服务器响应时间,达到超出设定的范围 </dt>
|
||||
<dt>原因1:后端电脑之间 IP 通讯缓慢而产生</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>如果您的 Web 服务器由某一网站托管, 只有负责那个网站设置的人员才能解决这个问题。</dd>
|
||||
<dt>原因2:由于nginx默认的fastcgi进程响应的缓冲区太小造成的错误</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>一般默认的fastcgi进程响应的缓冲区是8K,这时可以设置大一点,在nginx.conf里,加入:fastcgi_buffers 8 128k这表示设置fastcgi缓冲区为8块128k大小的空间。当然如果在进行某一项即时的操作, 可能需要nginx的超时参数调大点, 例如设置成60秒:send_timeout 60;经过这两个参数的调整,一般不会再提示“504 Gateway Time-out”错误,问题基本解决。</dd>
|
||||
<dt>原因3:PHP环境的配置问题</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>更改php-fpm的几处配置: 把max_children由之前的10改为现在的30,这样就可以保证有充足的php-cgi进程可以被使用; 把request_terminate_timeout由之前的0s改为60s,这样php-cgi进程 处理脚本的超时时间就是60秒,可以防止进程都被挂起,提高利用效率。 接着再更改nginx的几个配置项,减少FastCGI的请求次数,尽量维持buffers不变: fastcgi_buffers由 4 64k 改为 2 256k; fastcgi_buffer_size 由 64k 改为 128K; fastcgi_busy_buffers_size 由 128K 改为 256K; fastcgi_temp_file_write_size 由 128K 改为 256K。 重新加载php-fpm和nginx的配置,再次测试,如果没有出现“504 Gateway Time-out”错误,问题解决。</dd>
|
||||
<dt>错误说明:网关超时,服务器响应时间,达到超出设定的范围</dt>
|
||||
<dt>原因1:后端电脑之间 IP 通讯缓慢而产生</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>如果您的 Web 服务器由某一网站托管, 只有负责那个网站设置的人员才能解决这个问题。</dd>
|
||||
<dt>原因2:由于nginx默认的fastcgi进程响应的缓冲区太小造成的错误</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>一般默认的fastcgi进程响应的缓冲区是8K,这时可以设置大一点,在nginx.conf里,加入:fastcgi_buffers 8
|
||||
128k这表示设置fastcgi缓冲区为8块128k大小的空间。当然如果在进行某一项即时的操作, 可能需要nginx的超时参数调大点,
|
||||
例如设置成60秒:send_timeout 60;经过这两个参数的调整,一般不会再提示“504 Gateway Time-out”错误,问题基本解决。
|
||||
</dd>
|
||||
<dt>原因3:PHP环境的配置问题</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>更改php-fpm的几处配置: 把max_children由之前的10改为现在的30,这样就可以保证有充足的php-cgi进程可以被使用;
|
||||
把request_terminate_timeout由之前的0s改为60s,这样php-cgi进程 处理脚本的超时时间就是60秒,可以防止进程都被挂起,提高利用效率。
|
||||
接着再更改nginx的几个配置项,减少FastCGI的请求次数,尽量维持buffers不变: fastcgi_buffers由 4 64k 改为 2
|
||||
256k; fastcgi_buffer_size 由 64k 改为 128K; fastcgi_busy_buffers_size 由 128K 改为 256K;
|
||||
fastcgi_temp_file_write_size 由 128K 改为 256K。 重新加载php-fpm和nginx的配置,再次测试,如果没有出现“504
|
||||
Gateway Time-out”错误,问题解决。
|
||||
</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,66 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>505 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>505 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 505 - HTTP Version Not Supported</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 505 - HTTP Version Not Supported</h1>
|
||||
<dl>
|
||||
<dt>错误说明:HTTP 版本不受支持。</dt>
|
||||
<dt>原因1:您的 Web 服务器不支持,或拒绝支持客户端(如您的浏览器)在发送给服务器的 HTTP 请求数据流中指定的 HTTP 协议版本</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>升级您的 Web 服务器软件。</dd>
|
||||
<dt>原因2:http请求格式的错误</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>对照一下自己的代码,从打印的信息中终于找到问题所在。可能在请求后面多加了一个空格。http协议真是很严格了。</dd>
|
||||
<dt>错误说明:HTTP 版本不受支持。</dt>
|
||||
<dt>原因1:您的 Web 服务器不支持,或拒绝支持客户端(如您的浏览器)在发送给服务器的 HTTP 请求数据流中指定的 HTTP
|
||||
协议版本
|
||||
</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>升级您的 Web 服务器软件。</dd>
|
||||
<dt>原因2:http请求格式的错误</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>对照一下自己的代码,从打印的信息中终于找到问题所在。可能在请求后面多加了一个空格。http协议真是很严格了。
|
||||
</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,63 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>506 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>506 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 506 - Variant Also Negotiates</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 506 - Variant Also Negotiates</h1>
|
||||
<dl>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:服务器存在内部配置错误</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>被请求的协商变元资源被配置为在透明内容协商中使用自己,因此在一个协商处理中不是一个合适的重点。</dd>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:服务器存在内部配置错误</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>被请求的协商变元资源被配置为在透明内容协商中使用自己,因此在一个协商处理中不是一个合适的重点。</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,63 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>507 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>507 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 507 - Insufficient Storage</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 507 - Insufficient Storage</h1>
|
||||
<dl>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:服务器无法存储完成请求所必须的内容</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>这个状况被认为是临时的。WebDAV (RFC 4918)。</dd>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:服务器无法存储完成请求所必须的内容</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>这个状况被认为是临时的。WebDAV (RFC 4918)。</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,63 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>509 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>509 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 509 - Bandwidth Limit Exceeded</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 509 - Bandwidth Limit Exceeded</h1>
|
||||
<dl>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:网站流量已经超出您所购买的方案限制即服务器达到带宽限制</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>1.升级方案 2.等到下个月后流量重新计算,网站即可正常浏览。</dd>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:网站流量已经超出您所购买的方案限制即服务器达到带宽限制</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>1.升级方案 2.等到下个月后流量重新计算,网站即可正常浏览。</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,63 +1,66 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>510 错误 - phpstudy</title>
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
|
||||
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
|
||||
<meta HTTP-EQUIV="expires" CONTENT="0">
|
||||
<style>
|
||||
body{
|
||||
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
|
||||
}
|
||||
h1{
|
||||
margin: 0;
|
||||
color:#3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
.content{
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
.content >div{
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.content dl{
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>510 错误 - phpstudy</title>
|
||||
<meta content="" name="keywords">
|
||||
<meta content="" name="description">
|
||||
<meta content="webkit" name="renderer">
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
|
||||
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
||||
<meta content="yes" name="apple-mobile-web-app-capable">
|
||||
<meta content="telephone=no" name="format-detection">
|
||||
<meta CONTENT="no-cache" HTTP-EQUIV="pragma">
|
||||
<meta CONTENT="no-store, must-revalidate" HTTP-EQUIV="Cache-Control">
|
||||
<meta CONTENT="Wed, 26 Feb 1997 08:21:57 GMT" HTTP-EQUIV="expires">
|
||||
<meta CONTENT="0" HTTP-EQUIV="expires">
|
||||
<style>
|
||||
body {
|
||||
font: 16px arial, 'Microsoft Yahei', 'Hiragino Sans GB', sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
color: #3a87ad;
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 45%;
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
.content > div {
|
||||
margin-top: 200px;
|
||||
padding: 20px;
|
||||
background: #d9edf7;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.content dl {
|
||||
color: #2d6a88;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.content div div {
|
||||
padding-bottom: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 510 - Not Extended</h1>
|
||||
<div class="content">
|
||||
<div>
|
||||
<h1>HTTP 510 - Not Extended</h1>
|
||||
<dl>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:获取资源所需要的策略并没有被满足</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>需要请求有额外的扩展内容,服务器才能处理请求。</dd>
|
||||
<dt>错误说明:</dt>
|
||||
<dt>原因1:获取资源所需要的策略并没有被满足</dt>
|
||||
<dd>解决办法:</dd>
|
||||
<dd>需要请求有额外的扩展内容,服务器才能处理请求。</dd>
|
||||
</dl>
|
||||
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,111 +1,118 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
|
||||
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" rel="stylesheet">
|
||||
<script crossorigin="anonymous"
|
||||
integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
|
||||
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"></script>
|
||||
<script crossorigin="anonymous"
|
||||
integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy"
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script>
|
||||
<title>bunny-admin-server项目介绍</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f4f4f4;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
|
||||
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" rel="stylesheet">
|
||||
<script crossorigin="anonymous"
|
||||
integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
|
||||
src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"></script>
|
||||
<script crossorigin="anonymous"
|
||||
integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy"
|
||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.min.js"></script>
|
||||
<title>bunny-admin-server项目介绍</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f4f4f4;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: #007BFF;
|
||||
color: white;
|
||||
padding: 20px 0;
|
||||
text-align: center;
|
||||
}
|
||||
header {
|
||||
background-color: #007BFF;
|
||||
color: white;
|
||||
padding: 20px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: 20px auto;
|
||||
min-height: calc(100vh - 216px);
|
||||
padding: 20px;
|
||||
background-color: white;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
}
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: 20px auto;
|
||||
min-height: calc(100vh - 216px);
|
||||
padding: 20px;
|
||||
background-color: white;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 1px 5px;
|
||||
color: #FD9E5C;
|
||||
background-color: #282C34;
|
||||
border-radius: 5px;
|
||||
}
|
||||
code {
|
||||
padding: 1px 5px;
|
||||
color: #FD9E5C;
|
||||
background-color: #282C34;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
background-color: #007BFF;
|
||||
color: white;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
footer {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
background-color: #007BFF;
|
||||
color: white;
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<header>
|
||||
<h1>bunny-admin-server项目介绍</h1>
|
||||
</header>
|
||||
<header>
|
||||
<h1>bunny-admin-server项目介绍</h1>
|
||||
</header>
|
||||
|
||||
<div class="container">
|
||||
<h2>项目名称</h2>
|
||||
<p>这是权限管理系统,之前有2个版本,这个是第3个,我将部分的代码优化了一遍;比如下面的:</p>
|
||||
<ul>
|
||||
<li>登录优化:使用登录策略方便以后扩展登录方式</li>
|
||||
<li>邮件发送模板:邮件发送用的是模板方法模式</li>
|
||||
<li>密码校验:登录密码校验器,改用自带的不是md5加密,看起来像这样:<code>$2a$10$h5BUwmMaVcEuu7Bz0TPPy.PQV8JP6CFJlbHTgT78G1s0YPIu2kfXe</code>
|
||||
</li>
|
||||
<li>接口请求路径:将原本请求路径<code>/admin</code>改为<code>/api</code></li>
|
||||
</ul>
|
||||
<div class="container">
|
||||
<h2>项目名称</h2>
|
||||
<p>这是权限管理系统,之前有2个版本,这个是第3个,我将部分的代码优化了一遍;比如下面的:</p>
|
||||
<ul>
|
||||
<li>登录优化:使用登录策略方便以后扩展登录方式</li>
|
||||
<li>邮件发送模板:邮件发送用的是模板方法模式</li>
|
||||
<li>密码校验:登录密码校验器,改用自带的不是md5加密,看起来像这样:<code>$2a$10$h5BUwmMaVcEuu7Bz0TPPy.PQV8JP6CFJlbHTgT78G1s0YPIu2kfXe</code>
|
||||
</li>
|
||||
<li>接口请求路径:将原本请求路径<code>/admin</code>改为<code>/api</code></li>
|
||||
</ul>
|
||||
|
||||
<h4>展示下验证码图片</h4>
|
||||
<div class="carousel slide" id="carouselExampleIndicators">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
<img alt="验证码图片" class="d-block w-50" src="/noAuth/checkCode" style="margin: 0 auto">
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img alt="验证码图片" class="d-block w-50" src="/noAuth/checkCode" style="margin: 0 auto">
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img alt="验证码图片" class="d-block w-50" src="/noAuth/checkCode" style="margin: 0 auto">
|
||||
</div>
|
||||
</div>
|
||||
<button class="carousel-control-prev btn-link" data-bs-slide="prev" data-bs-target="#carouselExampleIndicators" type="button">
|
||||
<span aria-hidden="true" class="carousel-control-prev-icon"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" data-bs-slide="next" data-bs-target="#carouselExampleIndicators" type="button">
|
||||
<span aria-hidden="true" class="carousel-control-next-icon"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
<h4>展示下验证码图片</h4>
|
||||
<div class="carousel slide" id="carouselExampleIndicators">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
<img alt="验证码图片" class="d-block w-50" src="/noAuth/checkCode" style="margin: 0 auto">
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img alt="验证码图片" class="d-block w-50" src="/noAuth/checkCode" style="margin: 0 auto">
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img alt="验证码图片" class="d-block w-50" src="/noAuth/checkCode" style="margin: 0 auto">
|
||||
</div>
|
||||
|
||||
<h2>技术栈</h2>
|
||||
<p>前端vue,是小铭做的模板,我负责将前端模板实现下,加了接口,之后页面我自己添加了一些。</p>
|
||||
<p>后端Java,SpringSecurity就是主要的,中间件是:Redis、MySQL、Minio,因为自己做文件系统时间太长了就用了Minio。</p>
|
||||
|
||||
<a class="btn btn-success" href="http://bunny-web.site/" target="_blank">查看在线项目</a>
|
||||
<a class="btn btn-primary" href="http://localhost:7000/" target="_blank">查看本地项目</a>
|
||||
</div>
|
||||
<button class="carousel-control-prev btn-link" data-bs-slide="prev" data-bs-target="#carouselExampleIndicators"
|
||||
type="button">
|
||||
<span aria-hidden="true" class="carousel-control-prev-icon"></span>
|
||||
<span class="visually-hidden">Previous</span>
|
||||
</button>
|
||||
<button class="carousel-control-next" data-bs-slide="next" data-bs-target="#carouselExampleIndicators"
|
||||
type="button">
|
||||
<span aria-hidden="true" class="carousel-control-next-icon"></span>
|
||||
<span class="visually-hidden">Next</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<p>© 2025 Bunny.保留所有权利.</p>
|
||||
</footer>
|
||||
</body>
|
||||
<h2>技术栈</h2>
|
||||
<p>前端vue,是小铭做的模板,我负责将前端模板实现下,加了接口,之后页面我自己添加了一些。</p>
|
||||
<p>后端Java,SpringSecurity就是主要的,中间件是:Redis、MySQL、Minio,因为自己做文件系统时间太长了就用了Minio。</p>
|
||||
|
||||
<a class="btn btn-primary" target="_blank"
|
||||
th:href="@{'http://localhost:'+ ${@environment.getProperty('server.port')} + '/doc.html#/home'}">打开接口文档-knife4j</a>
|
||||
<a class="btn btn-primary"
|
||||
target="_blank"
|
||||
th:href="@{'http://localhost:'+${@environment.getProperty('server.port')}+'/swagger-ui/index.html'}">打开接口文档-swagger</a>
|
||||
<a class="btn btn-success" href="http://bunny-web.site/" target="_blank">查看在线项目</a>
|
||||
<a class="btn btn-primary" href="http://localhost:7000/" target="_blank">查看本地项目</a>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<p>© 2025 Bunny.保留所有权利.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
|
@ -1,26 +0,0 @@
|
|||
package cn.bunny.services.controller;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DeptControllerTest {
|
||||
|
||||
@Test
|
||||
void getDeptList() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void getAllDeptList() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void addDept() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void updateDept() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void deleteDept() {
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
package cn.bunny.services.controller;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
|
||||
class EmailTemplateControllerTest {
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
}
|
||||
}
|
|
@ -2,14 +2,10 @@ package cn.bunny.services.controller.configuration;
|
|||
|
||||
import cn.bunny.dao.dto.system.configuration.WebConfigurationDto;
|
||||
import cn.bunny.dao.entity.configuration.WebConfiguration;
|
||||
import cn.bunny.dao.entity.system.AdminUser;
|
||||
import cn.bunny.dao.vo.result.Result;
|
||||
import cn.bunny.dao.vo.system.user.LoginVo;
|
||||
import cn.bunny.services.mapper.system.UserMapper;
|
||||
import cn.bunny.services.utils.system.UserUtil;
|
||||
import cn.bunny.services.utils.TokenUtilsTest;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.TypeReference;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
@ -37,22 +33,15 @@ class ConfigurationControllerTest {
|
|||
private WebApplicationContext webApplicationContext;
|
||||
|
||||
@Autowired
|
||||
private UserUtil userUtil;
|
||||
|
||||
@Autowired
|
||||
private UserMapper userMapper;
|
||||
|
||||
private String token;
|
||||
private TokenUtilsTest tokenUtils;
|
||||
|
||||
private MockMvc mockMvc;
|
||||
|
||||
private String token;
|
||||
|
||||
@BeforeEach
|
||||
void setUpMockMvc() {
|
||||
AdminUser adminUser = userMapper.selectOne(Wrappers.<AdminUser>lambdaQuery().eq(AdminUser::getUsername, "Administrator"));
|
||||
adminUser.setPassword("admin123");
|
||||
LoginVo loginVo = userUtil.buildLoginUserVo(adminUser, 7);
|
||||
token = loginVo.getToken();
|
||||
|
||||
token = tokenUtils.getToken();
|
||||
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext)
|
||||
.apply(SecurityMockMvcConfigurers.springSecurity())
|
||||
.build();
|
||||
|
@ -74,7 +63,6 @@ class ConfigurationControllerTest {
|
|||
throw new Exception();
|
||||
}
|
||||
|
||||
|
||||
System.out.println(webConfiguration);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
package cn.bunny.services.controller.configuration;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class EmailTemplateControllerTest {
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void tearDown() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void getEmailTemplateList() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void getEmailTypes() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void addEmailTemplate() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void updateEmailTemplate() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void deleteEmailTemplate() {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,181 @@
|
|||
package cn.bunny.services.controller.log;
|
||||
|
||||
import cn.bunny.dao.dto.log.UserLoginLogDto;
|
||||
import cn.bunny.dao.entity.log.UserLoginLog;
|
||||
import cn.bunny.dao.vo.log.UserLoginLogLocalVo;
|
||||
import cn.bunny.dao.vo.log.UserLoginLogVo;
|
||||
import cn.bunny.dao.vo.result.PageResult;
|
||||
import cn.bunny.dao.vo.result.Result;
|
||||
import cn.bunny.services.service.log.UserLoginLogService;
|
||||
import cn.bunny.services.utils.TokenUtilsTest;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.TypeReference;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
import org.springframework.http.*;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
import org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
|
||||
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
|
||||
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@SpringBootTest
|
||||
@WebAppConfiguration
|
||||
class UserLoginLogControllerTest {
|
||||
private static final String prefix = "/api/userLoginLog";
|
||||
|
||||
private WebTestClient testClient;
|
||||
|
||||
@Autowired
|
||||
private WebApplicationContext webApplicationContext;
|
||||
|
||||
@Autowired
|
||||
private UserLoginLogService userLoginLogService;
|
||||
|
||||
@Autowired
|
||||
private TokenUtilsTest tokenUtils;
|
||||
|
||||
private MockMvc mockMvc;
|
||||
|
||||
private String token;
|
||||
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
token = tokenUtils.getToken();
|
||||
mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext)
|
||||
.apply(SecurityMockMvcConfigurers.springSecurity())
|
||||
.build();
|
||||
|
||||
testClient = WebTestClient.bindToController(new UserLoginLogController(userLoginLogService)).build();
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void tearDown() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void getUserLoginLogList() throws Exception {
|
||||
UserLoginLogDto dto = UserLoginLogDto.builder()
|
||||
.username("bunny")
|
||||
.build();
|
||||
|
||||
mockMvc.perform(MockMvcRequestBuilders.get(prefix + "/getUserLoginLogList/1/10")
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(JSON.toJSONString(dto))
|
||||
.header("token", token))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk())
|
||||
.andExpect(result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
String contentAsString = response.getContentAsString();
|
||||
|
||||
System.out.println(contentAsString);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void getUserLoginLogList2() {
|
||||
UserLoginLogDto dto = UserLoginLogDto.builder()
|
||||
.username("bunny")
|
||||
.build();
|
||||
Map<String, String> params = JSON.parseObject(JSON.toJSONString(dto), new TypeReference<>() {
|
||||
});
|
||||
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("token", token);
|
||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||
HttpEntity<Map<String, String>> request = new HttpEntity<>(params, headers);
|
||||
|
||||
// 发送请求
|
||||
ResponseEntity<Result<PageResult<UserLoginLogVo>>> response = restTemplate.exchange(
|
||||
"http://localhost:7070" + prefix + "/getUserLoginLogList/1/10",
|
||||
HttpMethod.GET,
|
||||
request,
|
||||
new ParameterizedTypeReference<>() {
|
||||
}
|
||||
);
|
||||
|
||||
Result<PageResult<UserLoginLogVo>> body = response.getBody();
|
||||
System.out.println(JSON.toJSONString(body));
|
||||
}
|
||||
|
||||
@Test
|
||||
void getUserLoginLogListByLocalUser() throws Exception {
|
||||
String api = prefix + "/noManage/getUserLoginLogListByLocalUser/1/10";
|
||||
|
||||
mockMvc.perform(MockMvcRequestBuilders.get(api)
|
||||
.header("token", token))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk())
|
||||
.andExpect(result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
String contentAsString = response.getContentAsString();
|
||||
|
||||
System.out.println(contentAsString);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void getUserLoginLogListByLocalUser2() {
|
||||
String api = prefix + "/noManage/getUserLoginLogListByLocalUser/1/10";
|
||||
|
||||
testClient.get()
|
||||
.uri(api)
|
||||
.header("token", token)
|
||||
.accept(MediaType.APPLICATION_JSON)
|
||||
.exchange()
|
||||
.expectStatus().isOk()
|
||||
.expectBody(new ParameterizedTypeReference<Result<PageResult<UserLoginLogLocalVo>>>() {
|
||||
})
|
||||
.consumeWith(result -> {
|
||||
Result<PageResult<UserLoginLogLocalVo>> responseBody = result.getResponseBody();
|
||||
System.out.println(JSON.toJSONString(responseBody));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void deleteUserLoginLog() throws Exception {
|
||||
String api = prefix + "/deleteUserLoginLog";
|
||||
|
||||
Page<UserLoginLog> page = new Page<>(1, 10);
|
||||
List<UserLoginLog> deleteBeforeList = userLoginLogService.list(page);
|
||||
List<Long> ids = deleteBeforeList.stream().map(UserLoginLog::getId).limit(4).toList();
|
||||
List<Long> deleteBeforeIds = deleteBeforeList.stream().map(UserLoginLog::getId).toList();
|
||||
|
||||
log.info("要删除的ids: {}", ids);
|
||||
log.info("删除前ids数据:{}", deleteBeforeIds);
|
||||
|
||||
mockMvc.perform(MockMvcRequestBuilders
|
||||
.delete(api)
|
||||
.header("token", token)
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(JSON.toJSONString(ids)))
|
||||
.andExpect(MockMvcResultMatchers.status().isOk())
|
||||
.andExpect(result -> {
|
||||
MockHttpServletResponse response = result.getResponse();
|
||||
String contentAsString = response.getContentAsString();
|
||||
System.out.println(contentAsString);
|
||||
});
|
||||
|
||||
deleteBeforeList = userLoginLogService.list(page);
|
||||
deleteBeforeIds = deleteBeforeList.stream().map(UserLoginLog::getId).toList();
|
||||
log.info("要删除的ids: {}", ids);
|
||||
log.info("删除前ids数据:{}", deleteBeforeIds);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package cn.bunny.services.utils;
|
||||
|
||||
import cn.bunny.dao.entity.system.AdminUser;
|
||||
import cn.bunny.dao.vo.system.user.LoginVo;
|
||||
import cn.bunny.services.mapper.system.UserMapper;
|
||||
import cn.bunny.services.utils.system.UserUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class TokenUtilsTest {
|
||||
@Autowired
|
||||
private UserUtil userUtil;
|
||||
|
||||
@Autowired
|
||||
private UserMapper userMapper;
|
||||
|
||||
public String getToken() {
|
||||
AdminUser adminUser = userMapper.selectOne(Wrappers.<AdminUser>lambdaQuery().eq(AdminUser::getUsername, "Administrator"));
|
||||
adminUser.setPassword("admin123");
|
||||
LoginVo loginVo = userUtil.buildLoginUserVo(adminUser, 7);
|
||||
return loginVo.getToken();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue