Spring learning creation project Hello spring instance code

This paper mainly studies the example code of Hello spring, the creation project of spring learning, as follows.

1、 Create eclipse project and introduce jar package

1. Eclipse creates a java project hellosppring

2. Create the Lib directory and add the five jar packages necessary for spring

3. Select 5 files, right click - > build path - > add to build path

2、 Write the Hello spring code for spring

1. Create package io spring. Beans and write HelloWorld java

2. SRC right click - > create spring bean configuration file ApplicationContext xml

3. Write main java

Output results

When the red spring log is printed in the console, it indicates that the spring application is successful

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>