19年毕业,本科是软件工程,喜欢写作,小时候曾幻想以后写一本爆火的小说。大三开源 JavaGuide 并一直完善至今。
关于作者:
联系我:
仿 Spring Boot 但不同于 Spring Boot 的一个轻量级的 HTTP 框架
19年毕业,本科是软件工程,喜欢写作,小时候曾幻想以后写一本爆火的小说。大三开源 JavaGuide 并一直完善至今。
关于作者:
联系我:
请问一下这是什么问题啊,肝不动了
Plugin [id: 'com.github.spotbugs', version: '4.3.0'] was not found in any of the following sources:
Guide哥,我试着照着项目敲了一遍,启动时出现这个错误,网上查了一圈也没能解决,想请教一下你
Execution failed for task ':JsonCatApplication.main()'.
Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_212.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
环境
macOs 10.15.6
IDEA Ultimate 2020.1.1
JDK 1.8
ps.我直接运行你的项目是没有这个问题的
要不还是加上阿里云的gradle源吧,不然太慢了。
对于我这种小白来说,下载可能就要好久。。。
异常类CannotInitializeConstructorException貌似错写成了CannotInitializaeConstructorException
很想知道netty实现的http框架在处理业务上,与tomcat这种servlet容器之间的对比,处理普通数据库类型的业务时是否会有优势?
Guide 哥,有个序列化的疑问想问下。
在测试代码 test/java/com/github/demo/user/UserControllerTest
中,最后一个测试方法 should_create_user_successful
中对 user
进行序列化。如果不进行序列化,也能测试通过。
在一篇文章 Testing REST Endpoints Using REST Assured 看到如下:
REST Assured makes the conversion automatically to a JSON object.
我尝试了如下更改,依然以通过测试:
@Test
void should_create_user_successful() {
UserDto user = new UserDto("压缩", "哈撒尅", 18);
with()//.body(jacksonSerializer.serialize(user)) // 我的修改
.body(user) // 我的修改
.header("Content-Type", "application/json")
.when().post("/user")
.then().
.statusCode(200);
}
这么说来,这里是不是不需要序列化,直接传对象进去即可自动转化呢?
.body()
的实现如下:
// groovy
RequestSpecification body(Object object) {
notNull object, "object"
if (!isSerializableCandidate(object)) {
return body(object.toString());
}
this.requestBody = ObjectMapping.serialize(object, requestContentType, findEncoderCharsetOrReturnDefault(requestContentType), null, objectMappingConfig(), restAssuredConfig().getEncoderConfig());
this
}
* 第一次提问,感谢 Guide 哥辛苦开源!
windows环境下单元测试会各种乱码,然后通不过,统一用action会不会更好
增加 .editorconfig 文件 添加默认编码,在启动时发现GBK乱码问题
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[*.{adoc,yml}]
indent_size = 2
[script/*]
indent_style = tab
/** * 二级缓存解决循环依赖问题 */ private Object resolveCircularDependency(Object beanInstance, Object beanFieldInstance, String beanFieldName) { if (SINGLETON_OBJECTS.containsKey(beanFieldName)) { beanFieldInstance = SINGLETON_OBJECTS.get(beanFieldName); } else { SINGLETON_OBJECTS.put(beanFieldName, beanFieldInstance); initialize(beanInstance); } return beanFieldInstance; }
initialize()方法是否应当传入字段实例beanFieldInstance
学生党表示吃力
在加载配置类时,为什么要使用AbstractResourceLoader实现接口
考虑出一个maven分支?
jsoncat里面是一次性把Bean全部创建出来,然后再遍历每个bean,注入依赖。这样不会存在递归爆栈的问题,所以不是很懂为什么需要解决循环依赖,也不是很懂这个循环依赖的代码。
Cannot run program "chmod": CreateProcess error=740, 请求的操作需要提升。
注入到容器的时候,用的类的名字或者,component的value值。自动装配的时候,只用类的名字去get而没用用component的value值。如果一个bean,用component注解注入容器,但是用的别名,别名和类名不一样,就get不出来了。
实际实现的方法是protect loadResources方法,然后让public调用protect方法,为什么要这么做呢?为什么不直接让继承类实现接口中的方法呢?有没有大佬能帮忙解释一下
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.