<!–

(adsbygoogle = window.adsbygoogle || []).push({});
–>

Usually in the development process , Inevitably, we need to deal with all kinds of exceptions , So here we customize the unified exception in the public module ,Spring Boot Provide @RestControllerAdvice Annotation unified exception handling , We are GitEgg_Platform New China gitegg-platform-boot Sub project , This project is mainly used for Spring Boot Customization and extension of related functions .

1、 modify gitegg-platform-boot Of pom.xml, add to spring-boot-starter-web and swagger rely on , Set up optional by true, Let this package not pass dependencies between projects .

 <dependency>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-web</artifactid>
<optional>true</optional>
</dependency>
<dependency>
<groupid>com.gitegg.platform</groupid>
<artifactid>gitegg-platform-swagger</artifactid>
<optional>true</optional>
</dependency>

2、 Custom generic response message class ,Result and PageResult, One is a normal response message , One is the paging response message .

Result class :

package com.gitegg.platform.boot.common.base;
import com.gitegg.platform.boot.common.enums.ResultCodeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*; /**
* @ClassName: Result
* @Description: Custom generic response class
* @author GitEgg
* @date 2020 year 09 month 19 Japan Afternoon 9:24:50
*/
@ApiModel(description = " General response class ")
@Getter
@ToString
public class Result<t> { @ApiModelProperty(value = " The success of ", required = true)
private boolean success; @ApiModelProperty(value =" Response code ", required = true)
private int code; @ApiModelProperty(value =" Prompt information ", required = true)
private String msg; @ApiModelProperty(value =" The response data ")
private T data; /**
*
* @param code
* @param data
* @param msg
*/
private Result(int code, T data, String msg) {
this.success = ResultCodeEnum.SUCCESS.code == code;
this.code = code;
this.msg = msg;
this.data = data;
} /**
*
* @param resultCodeEnum
*/
private Result(ResultCodeEnum resultCodeEnum ) {
this(resultCodeEnum.code, null, resultCodeEnum.msg);
} /**
*
* @param resultCodeEnum
* @param msg
*/
private Result(ResultCodeEnum resultCodeEnum , String msg) {
this(resultCodeEnum, null, msg);
} /**
*
* @param resultCodeEnum
* @param data
*/
private Result(ResultCodeEnum resultCodeEnum , T data) {
this(resultCodeEnum, data, resultCodeEnum.msg);
} /**
*
* @param resultCodeEnum
* @param data
* @param msg
*/
private Result(ResultCodeEnum resultCodeEnum , T data, String msg) {
this(resultCodeEnum.code, data, msg);
} /**
*
*
* @param data data
* @param <t> T The response data
* @
*/
public static <t> Result<t> data(T data) {
return data(data, ResultCodeEnum.SUCCESS.msg);
} /**
*
*
* @param data data
* @param msg news
* @param <t> T The response data
* @
*/
public static <t> Result<t> data(T data, String msg) {
return data(ResultCodeEnum.SUCCESS.code, data, msg);
} /**
*
*
* @param code Status code
* @param data data
* @param msg news
* @param <t> T The response data
* @
*/
public static <t> Result<t> data(int code, T data, String msg) {
return new Result<>(code, data, msg);
} /**
* return Result
*
* @param
* @param <t> T The response data
* @ return Result
*/
public static <t> Result<t> success() {
return new Result<>(ResultCodeEnum.SUCCESS);
} /**
* return Result
*
* @param msg news
* @param <t> T The response data
* @ return Result
*/
public static <t> Result<t> success(String msg) {
return new Result<>(ResultCodeEnum.SUCCESS, msg);
} /**
* return Result
*
* @param
* @param <t> T The response data
* @ return Result
*/
public static <t> Result<t> success(ResultCodeEnum resultCodeEnum ) {
return new Result<>(resultCodeEnum);
} /**
* return Result
*
* @param
* @param msg Prompt information
* @param <t> T The response data
* @ return Result
*/
public static <t> Result<t> success(ResultCodeEnum resultCodeEnum , String msg) {
return new Result<>(resultCodeEnum, msg);
} /**
* return Result
*
* @param <t> T The response data
* @ return Result
*/
public static <t> Result<t> error() {
return new Result<>(ResultCodeEnum.ERROR, ResultCodeEnum.ERROR.msg);
} /**
* return Result
*
* @param msg news
* @param <t> T The response data
* @ return Result
*/
public static <t> Result<t> error(String msg) {
return new Result<>(ResultCodeEnum.ERROR, msg);
} /**
* return Result
*
* @param code Status code
* @param msg news
* @param <t> T The response data
* @ return Result
*/
public static <t> Result<t> error(int code, String msg) {
return new Result<>(code, null, msg);
} /**
* return Result
*
* @param
* @param <t> T The response data
* @ return Result
*/
public static <t> Result<t> error(ResultCodeEnum resultCodeEnum ) {
return new Result<>(resultCodeEnum);
} /**
* return Result
*
* @param
* @param msg Prompt information
* @param <t> T The response data
* @ return Result
*/
public static <t> Result<t> error(ResultCodeEnum resultCodeEnum , String msg) {
return new Result<>(resultCodeEnum, msg);
} /**
*
* @param <t>
* @param flag
* @return
*/
public static <t> Result<t> result(boolean flag) {
return flag ? Result.success(" Successful operation ") : Result.error(" operation failed ");
} }

PageResult class :

package com.gitegg.platform.boot.common.base;
import java.util.List;
import com.gitegg.platform.boot.common.enums.ResultCodeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; /**
* @ClassName: PageResult
* @Description: General paging returns
* @author GitEgg
* @date
* @param <t>
*/
@Data
@ApiModel(" General paging response class ")
public class PageResult<t> { @ApiModelProperty(value = " The success of ", required = true)
private boolean success; @ApiModelProperty(value =" Response code ", required = true)
private int code; @ApiModelProperty(value =" Prompt information ", required = true)
private String msg; @ApiModelProperty(value =" Total quantity ", required = true)
private long count; @ApiModelProperty(value =" Paging data ")
private List<t> data; public PageResult(long total, List<t> rows) {
this.count = total;
this.data = rows;
this.code = ResultCodeEnum.SUCCESS.code;
this.msg = ResultCodeEnum.SUCCESS.msg;
}
}

3、 Custom generic response message enumeration class ResultCodeEnum.

package com.gitegg.platform.boot.common.enums;
/**
* @ClassName: ResultCodeEnum
* @Description: Custom return code enumeration
* @author GitEgg
* @date 2020 year 09 month 19 Japan Afternoon 11:49:45
*/
public enum ResultCodeEnum { /**
* success
*/
SUCCESS(200, " Successful operation "), /**
* System error
*/
ERROR(500, " System error "), /**
* operation failed
*/
FAILED(101, " operation failed "), /**
* Not logged in / login timeout
*/
UNAUTHORIZED(102, " login timeout "), /**
* Parameter error
*/
PARAM_ERROR(103, " Parameter error "), /**
* Parameter error - Already exists
*/
INVALID_PARAM_EXIST(104, " Request parameter already exists "), /**
* Parameter error
*/
INVALID_PARAM_EMPTY(105, " The request parameter is empty "), /**
* Parameter error
*/
PARAM_TYPE_MISMATCH(106, " Parameter type mismatch "), /**
* Parameter error
*/
PARAM_VALID_ERROR(107, " Parameter verification failed "), /**
* Parameter error
*/
ILLEGAL_REQUEST(108, " Illegal request "), /**
* Verification code error
*/
INVALID_VCODE(204, " Verification code error "), /**
* Wrong user name or password
*/
INVALID_USERNAME_PASSWORD(205, " Wrong account or password "), /**
*
*/
INVALID_RE_PASSWORD(206, " The two passwords are not the same "), /**
* Wrong user name or password
*/
INVALID_OLD_PASSWORD(207, " The old password is wrong "), /**
* repeat of user name
*/
USERNAME_ALREADY_IN(208, " User name already exists "), /**
* The user doesn't exist
*/
INVALID_USERNAME(209, " The username does not exist "), /**
* The character doesn't exist
*/
INVALID_ROLE(210, " The character doesn't exist "), /**
* The character doesn't exist
*/
ROLE_USED(211, " Role in use , Not delete "), /**
* No authority
*/
NO_PERMISSION(403, " The current user does not have permission for this interface "); public int code; public String msg; ResultCodeEnum(int code, String msg) {
this.code = code;
this.msg = msg;
} public int getCode() {
return code;
} public void setCode(int code) {
this.code = code;
} public String getMsg() {
return msg;
} public void setMsg(String msg) {
this.msg = msg;
}
}

4、 Custom exception classes BusinessException and SystemException

package com.gitegg.platform.boot.common.exception;
import com.gitegg.platform.boot.common.enums.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.Setter; /**
* @ClassName: BusinessException
* @Description: Business processing exception
* @author GitEgg
* @date
*/
@Getter
@Setter
public class BusinessException extends RuntimeException { private int code; private String msg; public BusinessException() {
this.code = ResultCodeEnum.FAILED.code;
this.msg = ResultCodeEnum.FAILED.msg;
} public BusinessException(String message) {
this.code = ResultCodeEnum.FAILED.code;
this.msg = message;
} public BusinessException(int code, String msg) {
this.code = code;
this.msg = msg;
} public BusinessException(Throwable cause) {
super(cause);
} public BusinessException(String message, Throwable cause) {
super(message, cause);
} }
package com.gitegg.platform.boot.common.exception;
import com.gitegg.platform.boot.common.enums.ResultCodeEnum;
import lombok.Getter; /**
* @ClassName: SystemException
* @Description: System handling exception
* @author GitEgg
* @date
*/
@Getter
public class SystemException extends RuntimeException { private int code; private String msg; public SystemException() {
this.code = ResultCodeEnum.ERROR.code;
this.msg = ResultCodeEnum.ERROR.msg;
} public SystemException(String message) {
this.code = ResultCodeEnum.ERROR.code;
this.msg = message;
} public SystemException(int code, String msg) {
this.code = code;
this.msg = msg;
} public SystemException(Throwable cause) {
super(cause);
} public SystemException(String message, Throwable cause) {
super(message, cause);
} }

5、 Custom unified exception handling class GitEggControllerAdvice.java

package com.gitegg.platform.boot.common.advice;
import com.gitegg.platform.boot.common.base.Result;
import com.gitegg.platform.boot.common.enums.ResultCodeEnum;
import com.gitegg.platform.boot.common.exception.BusinessException;
import com.gitegg.platform.boot.common.exception.SystemException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.ui.Model;
import org.springframework.web.HttpMediaTypeNotAcceptableException;
import org.springframework.web.HttpMediaTypeNotSupportedException;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.MissingPathVariableException;
import org.springframework.web.bind.MissingServletRequestParameterException;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
import org.springframework.web.servlet.NoHandlerFoundException; import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import javax.validation.ConstraintViolationException; @Slf4j
@RestControllerAdvice
public class GitEggControllerAdvice { /**
* service name
*/
@Value("${spring.application.name}")
private String serverName; /**
* Microservice system identification
*/
private String errorSystem; @PostConstruct
public void init() {
this.errorSystem = new StringBuffer()
.append(this.serverName)
.append(": ").toString();
} /**
* Apply to all @RequestMapping Annotation method , Initialize the data binder before it executes
*/
@InitBinder
public void initBinder(WebDataBinder binder) { } /**
* Bind values to Model in , Make global @RequestMapping You can get the value
*/
@ModelAttribute
public void addAttributes(Model model) { } /**
* Global exception capture processing
*/
@ExceptionHandler(value = {Exception.class})
public Result handlerException(Exception exception, HttpServletRequest request) {
log.error(" Request path uri={}, An exception occurred inside the system :{}", request.getRequestURI(), exception);
Result result = Result.error(ResultCodeEnum.ERROR, errorSystem + exception.toString());
return result;
} /**
* Illegal request exception
*/
@ExceptionHandler(value = {
HttpMediaTypeNotAcceptableException.class,
HttpMediaTypeNotSupportedException.class,
HttpRequestMethodNotSupportedException.class,
MissingServletRequestParameterException.class,
NoHandlerFoundException.class,
MissingPathVariableException.class,
HttpMessageNotReadableException.class
})
public Result handlerSpringAOPException(Exception exception) {
Result result = Result.error(ResultCodeEnum.ILLEGAL_REQUEST, errorSystem + exception.getMessage());
return result;
} /**
* Illegal request exception - Parameter type mismatch
*/
@ExceptionHandler(value = MethodArgumentTypeMismatchException.class)
public Result handlerSpringAOPException(MethodArgumentTypeMismatchException exception) {
Result result = Result.error(ResultCodeEnum.PARAM_TYPE_MISMATCH, errorSystem + exception.getMessage());
return result;
} /**
* Illegal request - Parameter checking
*/
@ExceptionHandler(value = {MethodArgumentNotValidException.class})
public Result handlerMethodArgumentNotValidException(MethodArgumentNotValidException methodArgumentNotValidException) {
// Get the exception field and the corresponding exception information
StringBuffer stringBuffer = new StringBuffer();
methodArgumentNotValidException.getBindingResult().getFieldErrors().stream()
.map(t -> t.getField()+"=>"+t.getDefaultMessage()+" ")
.forEach(e -> stringBuffer.append(e));
String errorMessage = stringBuffer.toString();
Result result = Result.error(ResultCodeEnum.PARAM_VALID_ERROR, errorSystem + errorMessage);
return result;
} /**
* Illegal request exception - Parameter checking
*/
@ExceptionHandler(value = {ConstraintViolationException.class})
public Result handlerConstraintViolationException(ConstraintViolationException constraintViolationException) {
String errorMessage = constraintViolationException.getLocalizedMessage();
Result result = Result.error(ResultCodeEnum.PARAM_VALID_ERROR, errorSystem + errorMessage);
return result;
} /**
* Custom business exception -BusinessException
*/
@ExceptionHandler(value = {BusinessException.class})
public Result handlerCustomException(BusinessException exception) {
String errorMessage = exception.getMsg();
Result result = Result.error(exception.getCode(), errorSystem + errorMessage);
return result;
} /**
* Custom system exceptions -SystemException
*/
@ExceptionHandler(value = {SystemException.class})
public Result handlerCustomException(SystemException exception) {
String errorMessage = exception.getMsg();
Result result = Result.error(exception.getCode(), errorSystem + errorMessage);
return result;
} }

6、 Re GitEgg-Platform Conduct install, stay GitEgg-Cloud Medium gitegg-service introduce gitegg-platform-boot

<!--?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/xsd/maven-4.0.0.xsd">
<parent>
<artifactid>GitEgg-Cloud</artifactid>
<groupid>com.gitegg.cloud</groupid>
<version>1.0-SNAPSHOT</version>
</parent>
<modelversion>4.0.0</modelversion> <artifactid>gitegg-service</artifactid>
<packaging>pom</packaging>
<modules>
<module>gitegg-service-base</module>
<module>gitegg-service-bigdata</module>
<module>gitegg-service-system</module>
</modules> <dependencies>
<!-- gitegg Spring Boot Customization and extension -->
<dependency>
<groupid>com.gitegg.platform</groupid>
<artifactid>gitegg-platform-boot</artifactid>
</dependency>
<!-- gitegg Database driver and connection pool -->
<dependency>
<groupid>com.gitegg.platform</groupid>
<artifactid>gitegg-platform-db</artifactid>
</dependency>
<!-- gitegg mybatis-plus -->
<dependency>
<groupid>com.gitegg.platform</groupid>
<artifactid>gitegg-platform-mybatis</artifactid>
</dependency>
<!-- gitegg swagger2-knife4j -->
<dependency>
<groupid>com.gitegg.platform</groupid>
<artifactid>gitegg-platform-swagger</artifactid>
</dependency>
<!-- spring boot web Core packages -->
<dependency>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-web</artifactid>
</dependency>
<!-- spring boot Health monitoring -->
<dependency>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-actuator</artifactid>
</dependency>
</dependencies> </project>

7、 modify SystemController.java、ISystemService.java and SystemServiceImpl.java Add test code for exception handling

SystemController.java:

package com.gitegg.service.system.controller;
import com.gitegg.platform.boot.common.base.Result;
import com.gitegg.platform.boot.common.exception.BusinessException;
import com.gitegg.service.system.service.ISystemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; @RestController
@RequestMapping(value = "system")
@AllArgsConstructor
@Api(tags = "gitegg-system")
public class SystemController { private final ISystemService systemService; @GetMapping(value = "list")
@ApiOperation(value = "system list Interface ")
public Object list() {
return systemService.list();
} @GetMapping(value = "page")
@ApiOperation(value = "system page Interface ")
public Object page() {
return systemService.page();
} @GetMapping(value = "exception")
@ApiOperation(value = " Custom exception and return test interface ")
public Result<string> exception() {
return Result.data(systemService.exception());
}
}

ISystemService.java:

package com.gitegg.service.system.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gitegg.service.system.entity.SystemTable; import java.util.List; public interface ISystemService { List<systemtable> list(); Page<systemtable> page(); String exception();
}

SystemServiceImpl.java:

package com.gitegg.service.system.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gitegg.platform.boot.common.exception.BusinessException;
import com.gitegg.service.system.entity.SystemTable;
import com.gitegg.service.system.mapper.SystemTableMapper;
import com.gitegg.service.system.service.ISystemService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service; import java.util.List; /**
*
*/
@Service
@AllArgsConstructor
public class SystemServiceImpl implements ISystemService { private final SystemTableMapper systemTableMapper; @Override
public List<systemtable> list() {
return systemTableMapper.list();
} @Override
public Page<systemtable> page() {
Page<systemtable> page = new Page<>(1, 10);
List<systemtable> records = systemTableMapper.page(page);
page.setRecords(records);
return page;
} @Override
public String exception() {
throw new BusinessException(" Custom exception ");
// return " Successful data acquisition ";
}
}

8、 function GitEggSystemApplication, Open browser access :http://127.0.0.1:8001/doc.html, Then click the exception handling interface on the left , Use Swagger2 To test , You can see the result

This article source code in https://gitee.com/wmz1930/GitEgg Of chapter-07 Branch .

<!–

(adsbygoogle = window.adsbygoogle || []).push({});
–>

SpringCloud Micro service practice —— Set up enterprise development framework ( 7、 … and ): More articles on customizing general response messages and unified exception handling

  1. springcloud Micro service practice — note

    At present Springcloud The understanding of is limited to :“ use [ Registration service . Configure the service ] To manage other micro services in a unified way ” This level . To be improved Springcloud This book is written by Zhai Yongchao 2017 year 5 Written in the month , Two years have passed , A little …

  2. SpringCloud Study (SPRINGCLOUD Micro service practice ) One

    SpringCloud Study (SPRINGCLOUD Micro service practice ) springboot introduction 1. The configuration file 1.1 Parameters can be customized and used in the program annotation @component @value for example If the configuration file is a …

  3. 【SpringCloud Micro service practical learning series 】 Service governance Spring Cloud Eureka

    Spring Cloud Eureka yes Spring Cloud Netflix Part of microservices , It’s based on NetFlix Sureka We did a second encapsulation , Mainly responsible for completing the service governance function in the microservice architecture . One . Service governance …

  4. SpringCloud Micro service practice —— Chapter III service governance

    Spring Cloud Eureka Service governance It is the core and basic module in the microservice architecture . It is used to realize the automatic registration and discovery of each microservice instance . Service registration : In the service governance framework , Will build a registry , Each service unit is registered with …

  5. 【SpringCloud Micro service practice 】 Build an enterprise application development framework ( One ): Architecture description

    SpringCloud Architecture of distributed application microservice system : SpringCloud Distributed application microservice system component list : Microservice framework components :Spring Boot2 + SpringCloud Hoxton.SR8 + …

  6. Spring-cloud Micro service practice 【 7、 … and 】: Service breakdown and degradation hystrix

    In the previous post , We have introduced eureka,ribbon,feign, Use eureka Cluster to ensure the high availability of the registry , stay eureka Use in ribbon Load balancing , Use feign Interface replacement manual encoding …

  7. 【SpringCloud Micro service practical learning series 】 Configuration details

    Preface Spring Boot For common development scenarios, a series of automatic configurations are provided to reduce the originally complex and rarely changed template configuration content . One . The configuration file Spring Boot The default profile location for is src/main.reso …

  8. Spring-cloud Micro service practice 【 8、 … and 】:API gateway zuul

    In the previous article , We have used eureka/ribbon/feign/hystrix Built a seemingly perfect micro service , Is there anything worth optimizing ? The answer is yes , If you look inside the whole microservice , Basically …

  9. Spring-cloud Micro service practice 【 Nine 】: Distributed configuration center config

    recall , In the previous article , We used spring cloud eureka/ribbon/feign/hystrix/zuul Build a complete microservice system , Both inside and outside the team have been relatively perfect , Then we …

  10. SpringCloud Micro service practice —— Chapter two Springboot

    Spring Boot Project engineering src/main/java: Main program entry HelloApplication, You can start by running the class directly Spring Boot application . src/main/resources: with …

Random recommendation

  1. Win8 app Determine the network connection status

    Win8 app Determine the network connection status NetworkInformation.NetworkStatusChanged += NetworkInformation_NetworkStatusChanged; …

  2. Know and learn BASH

    The application is on the outside , Just like the shell of an egg , Therefore, it is called shell( Shell program ). In fact, the function of the shell program is only to provide an interface to the operating system . Applications ↓ operating system ( System call + The core ) ↓ Hardware linux Preset shell Just …

  3. [ turn ] How to compile tizen Source code ( Text course )?

    http://blog.csdn.net/flydream0/article/details/9004746 The previous article described how to download tizen Source code (http://blog.csdn.net/fl …

  4. Python The magician –self

    ( The original is Python’s Magical Self , come from  http://concentricsky.com ) Python Of self Parameters can be maddening , such as , You must display the definition in the method of each class se …

  5. How to make buttons hover state

    1. Select text plus background layer 2.Ctrl+J Copy layers , Move it down . 3. Click on the background layer of the copied layer , Right click to select —— Mixed options Pop up the layer style box : 4. Select gradient overlay , Change the gradient —— Check in the reverse direction , determine : 5. complete , The effect is as shown in the picture .

  6. SQL Drip 22— Performance optimization is not so mysterious

    original text :SQL Drip 22- Performance optimization is not so mysterious I often hear that SQL Server The hardest part is performance optimization , I can’t help but feel that the work of optimization is very mysterious , This kind of thing can only be done by experts . Early on, I saw a blog written by an expert on the Internet , It introduces SQ …

  7. ASP.NET Core Build a personal website step by step ( Ongoing update ~~~)

    Abstract ASP.NET Core2.0 It’s been a while since it was released , This is a .NET Open source is a major milestone in cross platform development , It also means more than 1.0 The version needs to be more mature . at present .net core Open source . Cross platform . Flexible deployment . Modular architecture and so on , suction …

  8. iframe Local refresh of

      for example : <iframe src=”1.htm” name=”ifrmname” id=”ifrmid”></ifram …

  9. 【CentOS7】 Service environment construction

    It took two days , Completed the construction of the service environment . Recorded the construction process , The details of the build are not recorded . 1.OpenSSH. (1)yum search ssh (2)yum install openssh-server (3 …

  10. mysql error(2003) 10060 We need to solve it again

    Some time ago window We’ve dealt with this on virtual machines Now in linux We also encountered such problems on the Internet, and we checked them one by one 1. Network problems ,ping Tong however telnet (ip)  ( Port number ) Failure ,telnet(ip) All failed …