项目笔记1:
applicationContext-integration.xml<?xml version="1.0" encoding="UTF-8"?>
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd"
>
oasis.propertiespmsapi.url=https://localhost:8088/pmsws/xmlhtng.php
posapi.url=https://localhost:8089/posws/xmlhtng.php
oasis.host=localhost:8088
oasis.login.url=https://localhost:8088/hotel/code/login.php
PMSApiServiceImpl.javapublic class PMSApiServiceImpl implements PMSApiService {
protected final Logger logger = Logger.getLogger(PMSApiServiceImpl.class);
@Autowired
@Resource(name="jaxbMarshaller")
private Jaxb2Marshaller jaxbMarshaller ;
@Value(value ="#{oasisProperties['pmsapi.url']}")
private String apiUrl;
@Value(value="#{oasisProperties['posapi.url']}")
private String posApiUrl;
@Value(value ="#{oasisProperties['paramName']}")
private String paramName;
@Value(value ="#{oasisProperties['socketTimeout']}")
private int socketTimeout;
@Value(value ="#{oasisProperties['connectTimeout']}")
private int connectTimeout;
@Value(value ="#{oasisProperties['oasis.host']}")
private String oasisHost;
@Value(value ="#{oasisProperties['oasis.login.url']}")
private String loginUrl;
//.......
}