Spring5 Getting Started Small Demo
Environment: IDEA 2021.1, java8, JDK1.8
1. First create a java project in idea
2. After the creation is successful, right-click the project name, click "Add Framework Support..."
to check Spring, click OK
to download...
3. Create a Spring configuration file (two classes are created in src for later testing).
After the creation is successful, configure the context for bean1.xml, and then it can be used
Write a small test demo
1. Write an add method in the User class, let it print casually
2. Configure in bean1.xml, configure the object to be created
3. Create a user object in the TestSpring class, and call the user
to run the main method of the TestSpring class to see if it is successful
. OK, the first Spring demo is successful!