首页 > 编程语言 > 详细

spring study

时间:2017-10-16 01:06:34      阅读:297      评论:0      收藏:0      [点我收藏+]

Dependency Injection

The Inversion of Control(IoC) is a general concept, and it can be expressed in many different way. Dependency Injection is one of concrete exapmle of Inversion of Control.

Let us look at these word, Dependecy Injection, sperately. The dependcy means an association between two class. For example class A is dependet of class B. The second part, injection, means class B will get injected into class by the IoC.

Dependency Injection can happen on the way of passing parameters to the constructor or by post-construcotr using setter.

 

RESTful Services

A key different between a traditional MVC controller and the RESTful web service controller is the way that HTTP response body is created. Rather than relying on a view technology to render the HTML, the RESTful web service controller populates and return a object. The object data will be written directly to the HTTP response as JSON.

 

Reference:

Spring Framework - Overview, tutorialspoint

Building a RESTful Web Service, spring

 

spring study

原文:http://www.cnblogs.com/TonyYPZhang/p/7675216.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!