Interview-spring Understanding

Source: Internet
Author: User
Tags aop

Turn!!!!

http://hui.sohu.com/infonews/article/6331404387079946240

----------

Spring is the name of a series of open source tools maintained by pivotal, the most known of which is spring MVC, in fact, they are all Java components that are based on the spring framework and continue to be enhanced on one hand. Recently the spring framework has just been upgraded to 5, which is very good. It is more common to have spring boot,spring mvc,spring Webflux. The spring framework has been an XML hell in the past, and the current version has greatly improved, and among its 10 or so components, it basically covers the vast majority of Java development and is a very mature and robust Java application framework.
I was asked by the spring IOC when I had an interview that I did not want the official word, for example, IOC it is similar to a dish basket, before you need to go to the market to buy food, now you just have to put a dish in front of the house Applicationcontext.xml or also called???. XML, and then someone gives you moss, you want what kind of dish is bean, in the dish basket leave a note to reserve, want green vegetables will send vegetables, want to mushroom will send mushrooms, vegetables you want spinach or lettuce to reserve the property, mushrooms want to soil mushrooms or flammulina can also book the property, Then it will be the moss, you can not go out and sit at home waiting for the seaweed cooking

You know, first spring is a big concept, spring from the very beginning of a library to now a series, the most important of which include the spring Framework, Spring Data, Spring Security, Spring batch, and so on, and the quick Framework Spring Boot, the most important of which is the spring framework, which includes IOC, AOP, MVC, and testing.

The first thing to understand is what is spring's core idea?

The most central concept of spring's entire series is IOC, AOP, what IOC and AOP do not unfold, in short, the responsibility of the object creation process to the container, through the container to manage the death and death of the object, the object creation process from compile to run, that is, through the configuration to load, This solves the need not to compile late to select the concrete implementation, is actually the object-oriented core concept, programming for the interface. Java Learning Dry job interview experience Skirt: 282711949. The IOC started out as a factory with dependency management, so that a system was created from the original new to the configuration assembly, internally through injection to resolve the dependency, as long as the interface protocol Plug and Play. Through the IOC, AOP actually forms a routine through which the integration of the system is accomplished.

So spring does not say that he wrote an ORM, but with a unified routine to complete the integration of multiple ORM, which is the more the spring is the foundation of the larger, slowly formed the spring way, in fact, this is the most valuable place spring.

The second of course is some practice, in fact, the mainstream asked about a few directions, with the most should be Spring MVC, Spring Data, spring security and spring boot these pieces, because this is a practical content, many times it is show me The code, before the learning process has written a sample, basically all the standard spring way, you can take a reference, GITHUB-NONOCAST/TODOLIST:A simple todolist system implemented With Spring ' s backend and typescript/react ' s frontend. Enjoy it.

pring BootSpring MVCSpring SecurityGradleFreemarkerWebJarsSpring Data JPAMysqlWechatReactTypeScriptwebpackRedisMay it helps.

In fact, the software comes from life is right.

In life, what if there is a need for a man? To find a woman to marry is a direct new object, but one day found I do not and this person snapped, then divorce and then new object, but this involves the property division and a lot of formalities and so too troublesome, in other words is too high coupling, decoupling trouble.

At this time the wise man came up with a way, Ji Yuan!

such as heaven and Earth, a Ruhuasiyu girl realized a call "Miss" interface. When men have the need to go to heaven and earth, said: I want a mm, this time mm point to a specific object through the way of dependency injection to customer service. Next time you want to change a different flavor, the demand is still I want a mm, because here mm is polymorphic (the same parent type of reference to different objects).

This is the benefit of injecting an object through an interface type, in which the coupling degree is greatly reduced.

Now you understand, spring is called Spring, as the name implies spring. Spring container is to buy spring container is Ji Yuan!

Interview-spring Understanding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.