由买买提看人间百态

topics

全部话题 - 话题: putheader
(共0页)
z****e
发帖数: 54598
1
来自主题: Programming版 - Vert.x3 says "hello" to NPM users
http://vertx.io/blog/vert-x3-says-hello-to-npm-users/
13th July 2015 by pmlopes
In programming literature it has become the standard to create a hello world
program as the first example. In this
article I’ll be demonstrating how NPM users can quickly get started with
vert.x. You will see that it is not
that different and in fact it can be done using the tools you’re used to.
Note that although we are using NPM we are
not relying on node.js, all javascript code runs on the JVM.
Hello World Exampl... 阅读全帖
z****e
发帖数: 54598
2
来自主题: Programming版 - 发现先在java库很多fluent style api.
request
.response()
.putHeader("Content-Type", "text/plain")
.write("some text")
.end();
写成这样就好了
如果你想看log的话
用aop,直接设置pointcut = abc.com.ClassName.*
这样每次调用method/func的时候
都会被拦截,然后你在log中就会看到
类似
method name = response
method name = putHeader, parameter0 = Content-Type:String...
method name = write, parameter0 = "some text":String
method name = end
酱紫,看你自己怎么设置log了
T******7
发帖数: 1419
3
来自主题: Programming版 - 发现先在java库很多fluent style api.
比如zookeeper, 比如vert.x
request.response().putHeader("Content-Type", "text/plain").write("some text"
).end();
这种玩意debug起来是悲剧阿。还有exception怎么catch.
(共0页)