毫无疑问,这些setter是框架所需的样板代码,如果不使用构造器注入也能避免这一点岂不美哉?
Again, these setters are framework induced boilerplate code. Wouldn’t it be nice if they could be avoided without the need to use Constructor injection everywhere?
在清单7中,OpenIdLoginPage的构造器(示例应用程序中op的入口点)首先分解请求。
In Listing 7, OpenIdLoginPage's constructor (which is the entry point for the OP in the sample application) first cracks the request.
但是,如果我们只想给服务器传送一点儿有关我们的信息并且让服务器构造软件资源库条目,就像我们在上面的HTTP POST示例中做的一样,需要做些什么呢?
But what if we simply want to pass the server a few bits of relevant information for us and have it construct the software repository entry, as we did in the above HTTP POST example?
应用推荐