SSM framework integration detailed tutorial

Table of contents

1. What is SSM ?

2. How to access between containers when SSM is integrated

3. Development steps under SSM

4. Knowledge points that are easy to be confused when SSM is integrated


1. What is SSM?

SSM is an abbreviation for the names of the three frameworks. The first S refers to SpringMVC, the second S refers to Spring, and the third M refers to Mybatis. Let's use a simple diagram to show it:

2. How to access between containers when SSM is integrated?

Answer: When performing SSM integration, there will be two containers, one is the SpringMVC container and the other is the Spring container.

The object in the SpringMVC container is: Controller. The object in the Spring container is: Service.

How is the access between these two containers? The rules are as follows: it is defined at the beginning of the framework design, SpringMVC is the child container, Spring is the parent container, similar to the inheritance relationship of java, the child container can access the content of the parent container.

3. Development steps under SSM

4. Knowledge points that are easy to be confused when SSM is integrated

In addition, the places to pay attention to are:

  • In the address bar of the browser, you can directly access the image resources under the webapp folder
  • When integrating the SSM framework, it is best to write some functions and run the code once to avoid too many mistakes at one time, and I don’t know where to start to modify.
  • The pages under WEB-INF cannot be directly accessed through the address bar of the browser, but can only be accessed through internal request forwarding.


! ! ! alert! ! !

It’s time for a little story before going to bed every day. If you like it, you can read it.

Yugong Yishan

The legendary Taihang and Wangwu mountains are seven hundred miles around and seven or eight thousand feet high. They were originally located in the south of Jizhou and north of the north bank of the Yellow River. There is a man named Yugong at the foot of Beishan, who is nearly 90 years old and lives directly opposite the mountain. He suffered from the blockage in the northern part of the mountain, and he had to make a detour when he came out, so he called his family to discuss and said, "I will try my best to level the steep mountain with you, (make the road) all the way to the south of Yuzhou, and reach the south bank of the Han River. Is it okay?" The family all agreed. His wife questioned and said: "With your strength, you can't even level the hill of Kuifu. How can you do Taihang and Wangwu? Where do you put the dug earth and stones?" They said, "Take it to the ground." Throw it to the edge of the Bohai Sea, to the north of the hidden land." So Yu Gong led three of his children and grandchildren who could carry the load up the mountain, dug rocks and dug the soil, and transported it to the Bohai Sea with a dustpan. The widow of the neighboring Jingcheng family had an orphan, who was just seven or eight years old, and jumped up and down to help him. In winter and summer, only one round trip can be made. The wise old man on the bend of the river laughed at the old man and stopped him from doing this, saying: "You are so unintelligent, you are so stupid! With the remaining years and strength of yours, even a blade of grass on the mountain can be destroyed." If you can’t move, what can you do with the earth and rocks?” Beishan Yugong sighed and said, “Your thoughts are so stubborn that you can’t even open them up. You can’t even compare with orphans and widows. Even if I die, I still have my son. Sons beget grandsons, grandsons beget sons; sons beget sons, sons beget grandsons; descendants and grandchildren are endless, but the mountain will not grow taller and bigger, so are you afraid that it will not be leveled?” Hequ Zhisao had no answer. The mountain god holding the snake heard about it, and was afraid that he would dig it down endlessly, so he reported it to the Emperor of Heaven. Moved by Yu Gong's sincerity, the Emperor of Heaven ordered the two sons of the Hercules God Kua'e to carry away the two mountains, one in the east of Shuofang and the other in the south of Yongzhou. From then on, from the south of Jizhou to the south bank of the Han River, there were no high mountains to obstruct it.

This story tells us that persistence is the most important thing in people, and we must persevere in learning. Come on, yourself

Guess you like

Origin blog.csdn.net/weixin_44362089/article/details/127805566