Skip to content

Instantly share code, notes, and snippets.

View just-a-stone's full-sized avatar

shield just-a-stone

  • shanghai
View GitHub Profile
@just-a-stone
just-a-stone / config.json
Created January 30, 2023 15:14 — forked from tanpengsccd/config.json
v2ray服务端 json 配置 文件
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": { //理论最安全的方式 ws,有条件加上TLS
"port": 20080, //开启的端口,建议实用caddy加上TLS加密
"protocol": "vmess",
package com.ruicar.afs.cloud.engineering.workflow.todos.client.config;
import feign.Logger;
import feign.RequestInterceptor;
import feign.RequestTemplate;
import feign.Retryer;
import feign.okhttp.OkHttpClient;
import lombok.Setter;
import org.springframework.context.annotation.Bean;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
@just-a-stone
just-a-stone / PageConvertUtil.java
Created December 1, 2021 07:32
simplify mybatisplus's IPage object copy
package com.ruicar.afs.cloud.afscasedevice.utils;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotNull;
import org.springframework.cglib.beans.BeanCopier;
/**
private Executor getExecutor(Configuration configuration) {
Executor executor = null;
if (configuration.isSynchronous()) {
executor = Runnable::run;
} else {
executor = ForkJoinPool.commonPool();
}
return executor;
}
@just-a-stone
just-a-stone / git submodule.md
Created June 11, 2021 02:44
tips not always show in project

xk-basic

跨系统通用或交互类库,作为子模块引入其他系统

添加子模块

  1. git submodule add [email protected]:xiakuan/xk-basic.git
  2. git submodule init
  3. git config -f .gitmodules submodule.<submodule-path>.branch master
  4. git config -f .gitmodules submodule.<submodule-path>.update rebase

注意:设置拉取代码,采用ssh认证

@just-a-stone
just-a-stone / ControllerAdvice.java
Last active June 11, 2021 03:05
controller层 全局异常处理
package com.dycjr.xiakuan.workflow.support.interceptor;
import com.dycjr.xiakuan.basic.bean.RespDTO;
import com.dycjr.xiakuan.basic.exception.ErrorCode;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.flowable.common.engine.api.FlowableException;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
@just-a-stone
just-a-stone / ReadExcelFile.java
Created January 16, 2019 11:43 — forked from madan712/ReadExcelFile.java
Java - Read excel file with blank cells
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Row;