V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  agzou  ›  全部回复第 2 页 / 共 2 页
回复总数  31
1  2  
2021-07-12 17:16:30 +08:00
回复了 TimPeake 创建的主题 硬件 七彩虹 b460i 主板无法识别 海康威视 c2000 pro
我 c2000 用了几个月也坏了,然后售后换了 c2000pro😂😂
@Vegetable #1
@66beta #4
已经让运营自己拉个群讨论这个需求了。。
2021-05-26 11:30:21 +08:00
回复了 Aliberter 创建的主题 Java 求助! springboot 如何获取 url 上的参数,@PathVariable 复用问题
@Aspect
@Component
@RestController
public class Demo {
@RequestMapping()
public void test() {
//获取参数
ParamsHolder.getApiVersion();
}

@Pointcut(value = "@annotation(org.springframework.web.bind.annotation.RequestMapping)")
public void pointCut() {

}

@Around("pointCut()")
public Object process(ProceedingJoinPoint pjp) throws Throwable {
try {
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest req = servletRequestAttributes.getRequest();
ParamsHolder.setApiVersion(getApiVersion(req));
return pjp.proceed();
} finally {
ParamsHolder.removeApiVersion();
}

}

private String getApiVersion(HttpServletRequest request) {
// TODO: 2021/5/26 获取需要的参数
return null;
}

public static class ParamsHolder {
private static final ThreadLocal<String> API_VERSION = new ThreadLocal<>();

public static String getApiVersion() {
return API_VERSION.get();
}

private static void removeApiVersion() {
API_VERSION.remove();
}

private static void setApiVersion(String apiVersion) {
API_VERSION.set(apiVersion);
}
}
}
2021-05-26 11:06:02 +08:00
回复了 Aliberter 创建的主题 Java 求助! springboot 如何获取 url 上的参数,@PathVariable 复用问题
切面加自定义注解实现
2021-04-02 11:43:47 +08:00
回复了 abcbuzhiming 创建的主题 Java 请教,怎么才能把一个 list 塞进可变长参数里去
public class DemoApp {
public static void main(String[] args) {
List<String> data= new ArrayList<>();
byte[][] bytes = data.stream().map(String::getBytes).toArray(byte[][]::new);
test("",null,bytes);
}
private static void test(String var1 ,byte[] var2, byte[]... var3) {

}
}
2020-01-07 23:08:38 +08:00
回复了 Aliberter 创建的主题 程序员 Java 怎么设计一个优雅的返回结果类
@Data
public class JSONResult<T> {

public static final String SUCCESS = "OK";
public static final String ERROR = "ERROR";
private String msg;
private String status;
private T data;

public JSONResult() {
}

public JSONResult(T data) {
this.data = data;
this.status = SUCCESS;
}

public JSONResult(String msg) {
this.status = ERROR;
this.msg = msg;
}

public static <T> JSONResult<T> ok(T data) {
return new JSONResult<>(data);
}

public static <T> JSONResult<T> ok() {
return new JSONResult<>();
}

public static <T> AjaxResponse<T> error(String msg) {
return new JSONResult<>(msg);
}
}
2019-06-21 13:43:13 +08:00
回复了 Livid 创建的主题 DevOps 2019 年了,现在有什么功能上和 smokeping 类似的新的开源工具吗?
influx
@xmge 我用的是 mpvue,你直接在 wxss 文件写
.custom-class{
background-color:red;
}
应该是可以的
我用的是 mpvue,你直接在 wxss 文件写
.custom-class{
background-color:red;
}
应该是可以的
```css

<style lang="scss" scoped>
.tab {
background-color: #fafafc;

> div {
margin: 10px 0;
}
}
</style>
<style class="wxss">
page {
height: 100%;
background-color: #fafafc !important;
}
</style>
<style>
.custom-alone {
top: 0 !important;
right: 10px !important;
}
</style>
```
2019-01-04 09:47:54 +08:00
回复了 pytth 创建的主题 程序员 在线处理证件照底色,换证件照背景,大家用什么方法?
opencv
1  2  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3284 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 32ms · UTC 13:07 · PVG 21:07 · LAX 06:07 · JFK 09:07
Developed with CodeLauncher
♥ Do have faith in what you're doing.