首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > Apache >

apache ftpServer源码解读与收获(3)

2013-11-02 
apache ftpServer源码解读与收获(三)beans xmlnshttp://www.springframework.org/schema/beans xmlns:

apache ftpServer源码解读与收获(三)
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"
>
<description>Spring公共配置 </description>
<!-- 定义受环境影响易变的变量 -->
<bean

?????? value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />?
???<property name="ignoreResourceNotFound" value="true" />?
???<property name="locations">
??????? <list>
?????????? <value>classpath*:*.properties</value>
????? ?</list>
?? </property>
</bean>

<!-- 使用annotation 自动注册bean,并保证@Required,@Autowired的属性被注入 -->
<context:component-scan base-package="com.vingsoft.dataExchange" />
....省略......
<!-- 使用annotation定义事务 -->

<tx:annotation-driven transaction-manager="transactionManager"
proxy-target-/>
</beans>

???????????? xsi:schemaLocation="
http://mina.apache.org/ftpserver/spring/v1 http://mina.apache.org/ftpserver/ftpserver-1.0.xsd"
id="myServer">
?????????? <listeners>
???????????????? <nio-listener name="default" port="21">?
??????????????????????<ssl>
?????????????????????????? ?<keystore file="ftpserver.jks" password="password" />
???????????????????? </ssl>
??????????????? </nio-listener>
?????????? </listeners>
????????? <file-user-manager file="users.properties" />
</server>

非常重要的一段代码!!!!!!!!!向spring上下文注入bean信息。详情可以参考spring资料。后续有时间,再写篇文章探讨下spring的beanfactory管理。

热点排行