foreword
I have been learning java for nearly a year. I often use Spring and SpringBoot, but I often encounter bugs at work, and I can’t locate and solve them. So I decided to read the source code to deepen my understanding of the framework.
create project
-
Check it (the function is mentioned below)
2. Naming
-
The project structure is as follows, the function of checking Spring is to download the Spring jar package to lib, the function of checking Web Application is to automatically generate a web folder, put some configuration in web.xml, and index.jsp is a jsp page.
-
Next we configure the spring-config.xml file under src.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="user" class="com.learn.ioc.model.User">
<property name="name" value="小孙"/>
<property name="age" value="21"/>
</bean>
</beans>
- run