spring study

Posted TonyYPZhang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring study相关的知识,希望对你有一定的参考价值。

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的主要内容,如果未能解决你的问题,请参考以下文章

Spring全家桶笔记:Spring+Spring Boot+Spring Cloud+Spring MVC

学习笔记——Spring简介;Spring搭建步骤;Spring的特性;Spring中getBean三种方式;Spring中的标签

Spring--Spring入门

Spring框架--Spring事务管理和Spring事务传播行为

Spring框架--Spring事务管理和Spring事务传播行为

Spring框架--Spring JDBC