码迷,mamicode.com
首页 > 编程语言 > 详细

spring study

时间:2017-10-16 01:55:57      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:between   object   apm   iat   service   pop   pen   control   tar   

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

标签:between   object   apm   iat   service   pop   pen   control   tar   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!