Files
Spring-Framework-study/SpringFramework/src/main/resources/spring-config.xml
T
admin da42788b84 SpringStudy
- HelloWorld级别的学习
2026-09-21 10:58:27 +08:00

7 lines
467 B
XML

<?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">
<!-- scope: 作用域 prototype: 每次获取时都会创建一个新的实例 -->
<bean id="myUser" class="com.ycjy.entity.User" scope="prototype"/>
</beans>