spring 常用
来源:互联网 发布:淘宝仿货做的很好的店 编辑:程序博客网 时间:2024/06/07 20:36
- spring在项目初始化时加载类
public class InitDataListener implements InitializingBean, ServletContextAware {
<!-- spring系统启动以后,加载该类,查询所有数据 --> <bean class="com.zfsoft.listener.init.InitDataListener" />
2.spring加载远程配置文件
<?xml version="1.0" encoding="UTF-8"?> 2 <beans xmlns="http://www.springframework.org/schema/beans" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xmlns:p="http://www.springframework.org/schema/p" 5 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> 6 7 <bean id="propertyPlaceholderConfigurer" 8 class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 9 10 <!-- during developing, you can uncomment this to load local properties -->11 <!-- <property name="location" value="application.properties"/> -->12 13 <property name="properties">14 <bean id="remoteProperties" class="org.demo.RemoteProperties"15 p:url="http://172.21.12*.**/config/dev/application.properties"/>16 </property>17 </bean>18 19 <bean class="org.demo.Foo" p:name="${name}"></bean>20 21 </beans>
来自博客http://www.cnblogs.com/yjmyzz/p/how-to-load-remote-config-in-spring.html
阅读全文
0 0
- spring 常用
- 【Spring】Spring常用配置-Profile
- Spring常用配置文件
- Spring常用配置文件(转)
- Spring常用配置文件
- Spring基础常用 指引
- Spring 常用知识
- Spring常用的Listener
- Spring常用的配置
- spring常用注解
- Spring IOC 常用注解
- spring常用方法
- Spring常用的Listener
- Spring常用注解方式
- Spring基础常用
- spring jdbc 常用api
- Spring常用注解
- Spring常用知识点
- 条款7:多态基类的析构函数应该为虚函数
- APUE第六章学习笔记
- Spring Boot 以 jar 包方式运行在后台
- mysqldiff使用
- How to Turn On “About This Page” in Oracle R12 OAF Pages
- spring 常用
- java基础:面向对象(继承中构造方法的注意事项)
- Spring MVC 入门指南(一):HelloWorld
- 二叉树的路径和
- 算法基础-->贪心和动态规划
- poj2229 Sumsets(dp)
- python 使用mysqldb模块通过SSHTunnelForwarder隧道连接mysql
- leetcode 650. 2 Keys Keyboard
- windows查看端口占用以及关闭相应的进程