ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
<?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="poolConfig" class="redis.clients.jedis.JedisPoolConfig"> <property name="maxIdle" value="20"></property> <property name="maxTotal" value="25"></property> <property name="minIdle" value="10"></property> </bean> <bean id="jedisPool" class="redis.clients.jedis.JedisPool"> <constructor-arg name="poolConfig" ref="poolConfig"></constructor-arg> <constructor-arg name="host" value="192.168.120.130"></constructor-arg> <constructor-arg name="port" value="6379"></constructor-arg> <constructor-arg name="password" value="123456"></constructor-arg> <constructor-arg name="timeout" value="5000"></constructor-arg> </bean> </beans> <bean id=”user” class=”com.sxt.domain.User”> <property name=”” ref/value=””> </bean> ![](https://img.kancloud.cn/09/7e/097e9e2a53282193cc8306cee83e51be_312x85.png) 修改配置文件获取对象的方式 ![](https://img.kancloud.cn/07/c2/07c28726c825ed55ec5dd62dc9572bbf_885x28.png) 3 用实例工厂创建UserFactory 创建不是静态方法,返回类对象 ![](https://img.kancloud.cn/b1/e6/b1e644cecb14d12cc26683142b803026_325x71.png) 修改配置文件获取对象 ![](https://img.kancloud.cn/b0/f5/b0f5c6bf11451d29eb1724b629fef99c_796x51.png)