Commit 9d52b7d1874812ed8c2ce2e7cef5b7a3d369e784
1 parent
8f317bd9
1.chengdu分支配置变更
Showing
2 changed files
with
292 additions
and
217 deletions
pom.xml
| 1 | -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 2 | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 3 | - | |
| 4 | - <modelVersion>4.0.0</modelVersion> | |
| 5 | - <groupId>com.bsth</groupId> | |
| 6 | - <artifactId>control_service_data_interface</artifactId> | |
| 7 | - <version>0.0.1-SNAPSHOT</version> | |
| 8 | - <packaging>jar</packaging> | |
| 9 | - | |
| 10 | - <parent> | |
| 11 | - <groupId>org.springframework.boot</groupId> | |
| 12 | - <artifactId>spring-boot-starter-parent</artifactId> | |
| 13 | - <version>1.5.2.RELEASE</version> | |
| 14 | - </parent> | |
| 15 | - | |
| 16 | - <dependencies> | |
| 17 | - <dependency> | |
| 18 | - <groupId>org.apache.cxf</groupId> | |
| 19 | - <artifactId>cxf-rt-frontend-jaxws</artifactId> | |
| 20 | - <version>3.1.10</version> | |
| 21 | - </dependency> | |
| 22 | - | |
| 23 | - <dependency> | |
| 24 | - <groupId>org.apache.cxf</groupId> | |
| 25 | - <artifactId>cxf-rt-transports-http</artifactId> | |
| 26 | - <version>3.1.10</version> | |
| 27 | - </dependency> | |
| 28 | - | |
| 29 | - <dependency> | |
| 30 | - <groupId>org.apache.cxf</groupId> | |
| 31 | - <artifactId>cxf-rt-rs-service-description</artifactId> | |
| 32 | - <version>3.1.10</version> | |
| 33 | - </dependency> | |
| 34 | - | |
| 35 | - <dependency> | |
| 36 | - <groupId>org.springframework.boot</groupId> | |
| 37 | - <artifactId>spring-boot-starter-web</artifactId> | |
| 38 | - </dependency> | |
| 39 | - | |
| 40 | - <dependency> | |
| 41 | - <groupId>org.springframework.boot</groupId> | |
| 42 | - <artifactId>spring-boot-starter-tomcat</artifactId> | |
| 43 | - <scope>provided</scope> | |
| 44 | - </dependency> | |
| 45 | - | |
| 46 | - <dependency> | |
| 47 | - <groupId>org.springframework.boot</groupId> | |
| 48 | - <artifactId>spring-boot-starter-data-jpa</artifactId> | |
| 49 | - </dependency> | |
| 50 | - <dependency> | |
| 51 | - <groupId>org.springframework.boot</groupId> | |
| 52 | - <artifactId>spring-boot-starter-aop</artifactId> | |
| 53 | - </dependency> | |
| 54 | - | |
| 55 | - <dependency> | |
| 56 | - <groupId>org.springframework.boot</groupId> | |
| 57 | - <artifactId>spring-boot-starter-data-redis</artifactId> | |
| 58 | - </dependency> | |
| 59 | - | |
| 60 | - <dependency> | |
| 61 | - <groupId>org.springframework</groupId> | |
| 62 | - <artifactId>spring-context-support</artifactId> | |
| 63 | - </dependency> | |
| 64 | - <dependency> | |
| 65 | - <groupId>mysql</groupId> | |
| 66 | - <artifactId>mysql-connector-java</artifactId> | |
| 67 | - </dependency> | |
| 68 | - | |
| 69 | - <dependency> | |
| 70 | - <groupId>joda-time</groupId> | |
| 71 | - <artifactId>joda-time</artifactId> | |
| 72 | - </dependency> | |
| 73 | - <dependency> | |
| 74 | - <groupId>com.alibaba</groupId> | |
| 75 | - <artifactId>fastjson</artifactId> | |
| 76 | - <version>1.2.4</version> | |
| 77 | - </dependency> | |
| 78 | - | |
| 79 | - <dependency> | |
| 80 | - <groupId>org.apache.httpcomponents</groupId> | |
| 81 | - <artifactId>httpclient</artifactId> | |
| 82 | - </dependency> | |
| 83 | - | |
| 84 | - <dependency> | |
| 85 | - <groupId>commons-dbcp</groupId> | |
| 86 | - <artifactId>commons-dbcp</artifactId> | |
| 87 | - </dependency> | |
| 88 | - <dependency> | |
| 89 | - <groupId>commons-lang</groupId> | |
| 90 | - <artifactId>commons-lang</artifactId> | |
| 91 | - <version>2.6</version> | |
| 92 | - </dependency> | |
| 93 | - <dependency> | |
| 94 | - <groupId>org.apache.commons</groupId> | |
| 95 | - <artifactId>commons-lang3</artifactId> | |
| 96 | - <version>3.4</version> | |
| 97 | - </dependency> | |
| 98 | - <dependency> | |
| 99 | - <groupId>commons-fileupload</groupId> | |
| 100 | - <artifactId>commons-fileupload</artifactId> | |
| 101 | - <version>1.2.2</version> | |
| 102 | - </dependency> | |
| 103 | - <dependency> | |
| 104 | - <groupId>commons-io</groupId> | |
| 105 | - <artifactId>commons-io</artifactId> | |
| 106 | - <version>2.4</version> | |
| 107 | - </dependency> | |
| 108 | - <dependency> | |
| 109 | - <groupId>org.codehaus.janino</groupId> | |
| 110 | - <artifactId>janino</artifactId> | |
| 111 | - </dependency> | |
| 112 | - | |
| 113 | - <dependency> | |
| 114 | - <groupId>org.apache.poi</groupId> | |
| 115 | - <artifactId>poi</artifactId> | |
| 116 | - <version>3.13</version> | |
| 117 | - </dependency> | |
| 118 | - | |
| 119 | - <dependency> | |
| 120 | - <groupId>com.google.guava</groupId> | |
| 121 | - <artifactId>guava</artifactId> | |
| 122 | - <version>19.0</version> | |
| 123 | - </dependency> | |
| 124 | - | |
| 125 | - <dependency> | |
| 126 | - <groupId>c3p0</groupId> | |
| 127 | - <artifactId>c3p0</artifactId> | |
| 128 | - <version>0.9.1.2</version> | |
| 129 | - </dependency> | |
| 130 | - | |
| 131 | - <dependency> | |
| 132 | - <groupId>axis</groupId> | |
| 133 | - <artifactId>axis</artifactId> | |
| 134 | - <version>1.4</version> | |
| 135 | - </dependency> | |
| 136 | - | |
| 137 | - <dependency> | |
| 138 | - <groupId>com.fasterxml.jackson.jaxrs</groupId> | |
| 139 | - <artifactId>jackson-jaxrs-json-provider</artifactId> | |
| 140 | - <version>2.8.7</version> | |
| 141 | - </dependency> | |
| 142 | - | |
| 143 | - <dependency> | |
| 144 | - <groupId>org.eclipse.jetty</groupId> | |
| 145 | - <artifactId>jetty-util</artifactId> | |
| 146 | - <version>8.1.15.v20140411</version> | |
| 147 | - </dependency> | |
| 148 | - | |
| 149 | - <dependency> | |
| 150 | - <groupId>org.apache.geronimo.specs</groupId> | |
| 151 | - <artifactId>geronimo-jaxws_2.2_spec</artifactId> | |
| 152 | - <version>1.0</version> | |
| 153 | - </dependency> | |
| 154 | - | |
| 155 | - <dependency> | |
| 156 | - <groupId>org.springframework.kafka</groupId> | |
| 157 | - <artifactId>spring-kafka</artifactId> | |
| 158 | - </dependency> | |
| 159 | - </dependencies> | |
| 160 | - | |
| 161 | - <build> | |
| 162 | - <plugins> | |
| 163 | - <plugin> | |
| 164 | - <artifactId>maven-compiler-plugin</artifactId> | |
| 165 | - <version>2.3.2</version><!--$NO-MVN-MAN-VER$ --> | |
| 166 | - <configuration> | |
| 167 | - <source>1.7</source> | |
| 168 | - <target>1.7</target> | |
| 169 | - </configuration> | |
| 170 | - </plugin> | |
| 171 | - <plugin> | |
| 172 | - <artifactId>maven-war-plugin</artifactId> | |
| 173 | - <version>2.2</version><!--$NO-MVN-MAN-VER$ --> | |
| 174 | - <configuration> | |
| 175 | - <failOnMissingWebXml>false</failOnMissingWebXml> | |
| 176 | - </configuration> | |
| 177 | - </plugin> | |
| 178 | - <plugin> | |
| 179 | - <groupId>org.springframework.boot</groupId> | |
| 180 | - <artifactId>spring-boot-maven-plugin</artifactId> | |
| 181 | - </plugin> | |
| 182 | - </plugins> | |
| 183 | - <resources> | |
| 184 | - <resource> | |
| 185 | - <directory>src/main/resources</directory> | |
| 186 | - <filtering>false</filtering> | |
| 187 | - </resource> | |
| 188 | - </resources> | |
| 189 | - </build> | |
| 190 | - <repositories> | |
| 191 | - <repository> | |
| 192 | - <id>spring-snapshots</id> | |
| 193 | - <url>http://repo.spring.io/snapshot</url> | |
| 194 | - <snapshots> | |
| 195 | - <enabled>true</enabled> | |
| 196 | - </snapshots> | |
| 197 | - </repository> | |
| 198 | - <repository> | |
| 199 | - <id>spring-milestones</id> | |
| 200 | - <url>http://repo.spring.io/milestone</url> | |
| 201 | - </repository> | |
| 202 | - </repositories> | |
| 203 | - <pluginRepositories> | |
| 204 | - <pluginRepository> | |
| 205 | - <id>spring-snapshots</id> | |
| 206 | - <url>http://repo.spring.io/snapshot</url> | |
| 207 | - </pluginRepository> | |
| 208 | - <pluginRepository> | |
| 209 | - <id>spring-milestones</id> | |
| 210 | - <url>http://repo.spring.io/milestone</url> | |
| 211 | - </pluginRepository> | |
| 212 | - </pluginRepositories> | |
| 213 | - | |
| 214 | - <properties> | |
| 215 | - <start-class>com.bsth.Application</start-class> | |
| 216 | - </properties> | |
| 217 | -</project> | |
| 1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| 2 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| 3 | + | |
| 4 | + <modelVersion>4.0.0</modelVersion> | |
| 5 | + <groupId>com.bsth</groupId> | |
| 6 | + <artifactId>control_service_data_interface</artifactId> | |
| 7 | + <version>0.0.1-SNAPSHOT</version> | |
| 8 | + <packaging>jar</packaging> | |
| 9 | + | |
| 10 | + <parent> | |
| 11 | + <groupId>org.springframework.boot</groupId> | |
| 12 | + <artifactId>spring-boot-starter-parent</artifactId> | |
| 13 | + <version>1.5.2.RELEASE</version> | |
| 14 | + </parent> | |
| 15 | + | |
| 16 | + <dependencies> | |
| 17 | + <dependency> | |
| 18 | + <groupId>org.apache.cxf</groupId> | |
| 19 | + <artifactId>cxf-rt-frontend-jaxws</artifactId> | |
| 20 | + <version>3.1.10</version> | |
| 21 | + </dependency> | |
| 22 | + | |
| 23 | + <dependency> | |
| 24 | + <groupId>org.apache.cxf</groupId> | |
| 25 | + <artifactId>cxf-rt-transports-http</artifactId> | |
| 26 | + <version>3.1.10</version> | |
| 27 | + </dependency> | |
| 28 | + | |
| 29 | + <dependency> | |
| 30 | + <groupId>org.apache.cxf</groupId> | |
| 31 | + <artifactId>cxf-rt-rs-service-description</artifactId> | |
| 32 | + <version>3.1.10</version> | |
| 33 | + </dependency> | |
| 34 | + | |
| 35 | + <dependency> | |
| 36 | + <groupId>org.springframework.boot</groupId> | |
| 37 | + <artifactId>spring-boot-starter-web</artifactId> | |
| 38 | + </dependency> | |
| 39 | + | |
| 40 | + <dependency> | |
| 41 | + <groupId>org.springframework.boot</groupId> | |
| 42 | + <artifactId>spring-boot-starter-tomcat</artifactId> | |
| 43 | + <scope>provided</scope> | |
| 44 | + </dependency> | |
| 45 | + | |
| 46 | + <dependency> | |
| 47 | + <groupId>org.springframework.boot</groupId> | |
| 48 | + <artifactId>spring-boot-starter-data-jpa</artifactId> | |
| 49 | + </dependency> | |
| 50 | + <dependency> | |
| 51 | + <groupId>org.springframework.boot</groupId> | |
| 52 | + <artifactId>spring-boot-starter-aop</artifactId> | |
| 53 | + </dependency> | |
| 54 | + | |
| 55 | + <dependency> | |
| 56 | + <groupId>org.springframework.boot</groupId> | |
| 57 | + <artifactId>spring-boot-starter-data-redis</artifactId> | |
| 58 | + </dependency> | |
| 59 | + | |
| 60 | + <dependency> | |
| 61 | + <groupId>org.springframework</groupId> | |
| 62 | + <artifactId>spring-context-support</artifactId> | |
| 63 | + </dependency> | |
| 64 | + <dependency> | |
| 65 | + <groupId>mysql</groupId> | |
| 66 | + <artifactId>mysql-connector-java</artifactId> | |
| 67 | + </dependency> | |
| 68 | + | |
| 69 | + <dependency> | |
| 70 | + <groupId>joda-time</groupId> | |
| 71 | + <artifactId>joda-time</artifactId> | |
| 72 | + </dependency> | |
| 73 | + <dependency> | |
| 74 | + <groupId>com.alibaba</groupId> | |
| 75 | + <artifactId>fastjson</artifactId> | |
| 76 | + <version>1.2.4</version> | |
| 77 | + </dependency> | |
| 78 | + | |
| 79 | + <dependency> | |
| 80 | + <groupId>org.apache.httpcomponents</groupId> | |
| 81 | + <artifactId>httpclient</artifactId> | |
| 82 | + </dependency> | |
| 83 | + | |
| 84 | + <dependency> | |
| 85 | + <groupId>commons-dbcp</groupId> | |
| 86 | + <artifactId>commons-dbcp</artifactId> | |
| 87 | + </dependency> | |
| 88 | + <dependency> | |
| 89 | + <groupId>commons-lang</groupId> | |
| 90 | + <artifactId>commons-lang</artifactId> | |
| 91 | + <version>2.6</version> | |
| 92 | + </dependency> | |
| 93 | + <dependency> | |
| 94 | + <groupId>org.apache.commons</groupId> | |
| 95 | + <artifactId>commons-lang3</artifactId> | |
| 96 | + <version>3.4</version> | |
| 97 | + </dependency> | |
| 98 | + <dependency> | |
| 99 | + <groupId>commons-fileupload</groupId> | |
| 100 | + <artifactId>commons-fileupload</artifactId> | |
| 101 | + <version>1.2.2</version> | |
| 102 | + </dependency> | |
| 103 | + <dependency> | |
| 104 | + <groupId>commons-io</groupId> | |
| 105 | + <artifactId>commons-io</artifactId> | |
| 106 | + <version>2.4</version> | |
| 107 | + </dependency> | |
| 108 | + <dependency> | |
| 109 | + <groupId>org.codehaus.janino</groupId> | |
| 110 | + <artifactId>janino</artifactId> | |
| 111 | + </dependency> | |
| 112 | + | |
| 113 | + <dependency> | |
| 114 | + <groupId>org.apache.poi</groupId> | |
| 115 | + <artifactId>poi</artifactId> | |
| 116 | + <version>3.13</version> | |
| 117 | + </dependency> | |
| 118 | + | |
| 119 | + <dependency> | |
| 120 | + <groupId>com.google.guava</groupId> | |
| 121 | + <artifactId>guava</artifactId> | |
| 122 | + <version>19.0</version> | |
| 123 | + </dependency> | |
| 124 | + | |
| 125 | + <dependency> | |
| 126 | + <groupId>c3p0</groupId> | |
| 127 | + <artifactId>c3p0</artifactId> | |
| 128 | + <version>0.9.1.2</version> | |
| 129 | + </dependency> | |
| 130 | + | |
| 131 | + <dependency> | |
| 132 | + <groupId>axis</groupId> | |
| 133 | + <artifactId>axis</artifactId> | |
| 134 | + <version>1.4</version> | |
| 135 | + </dependency> | |
| 136 | + | |
| 137 | + <dependency> | |
| 138 | + <groupId>com.fasterxml.jackson.jaxrs</groupId> | |
| 139 | + <artifactId>jackson-jaxrs-json-provider</artifactId> | |
| 140 | + <version>2.8.7</version> | |
| 141 | + </dependency> | |
| 142 | + | |
| 143 | + <dependency> | |
| 144 | + <groupId>org.eclipse.jetty</groupId> | |
| 145 | + <artifactId>jetty-util</artifactId> | |
| 146 | + <version>8.1.15.v20140411</version> | |
| 147 | + </dependency> | |
| 148 | + | |
| 149 | + <dependency> | |
| 150 | + <groupId>org.apache.geronimo.specs</groupId> | |
| 151 | + <artifactId>geronimo-jaxws_2.2_spec</artifactId> | |
| 152 | + <version>1.0</version> | |
| 153 | + </dependency> | |
| 154 | + | |
| 155 | + <dependency> | |
| 156 | + <groupId>org.springframework.kafka</groupId> | |
| 157 | + <artifactId>spring-kafka</artifactId> | |
| 158 | + </dependency> | |
| 159 | + </dependencies> | |
| 160 | + | |
| 161 | + <build> | |
| 162 | + <plugins> | |
| 163 | + <plugin> | |
| 164 | + <artifactId>maven-compiler-plugin</artifactId> | |
| 165 | + <version>2.3.2</version><!--$NO-MVN-MAN-VER$ --> | |
| 166 | + <configuration> | |
| 167 | + <source>1.7</source> | |
| 168 | + <target>1.7</target> | |
| 169 | + </configuration> | |
| 170 | + </plugin> | |
| 171 | + <plugin> | |
| 172 | + <groupId>net.roseboy</groupId> | |
| 173 | + <artifactId>classfinal-maven-plugin</artifactId> | |
| 174 | + <version>1.2.1</version> | |
| 175 | + <configuration> | |
| 176 | + <password>bsth@369147258</password> | |
| 177 | + <packages>com.bsth</packages> | |
| 178 | + <cfgfiles>application*.properties</cfgfiles> | |
| 179 | + <excludes>org.spring</excludes> | |
| 180 | + <libjars></libjars> | |
| 181 | + </configuration> | |
| 182 | + <executions> | |
| 183 | + <execution> | |
| 184 | + <phase>package</phase> | |
| 185 | + <goals> | |
| 186 | + <goal>classFinal</goal> | |
| 187 | + </goals> | |
| 188 | + </execution> | |
| 189 | + </executions> | |
| 190 | + </plugin> | |
| 191 | + <plugin> | |
| 192 | + <artifactId>maven-war-plugin</artifactId> | |
| 193 | + <version>2.2</version><!--$NO-MVN-MAN-VER$ --> | |
| 194 | + <configuration> | |
| 195 | + <failOnMissingWebXml>false</failOnMissingWebXml> | |
| 196 | + </configuration> | |
| 197 | + </plugin> | |
| 198 | + <plugin> | |
| 199 | + <groupId>org.springframework.boot</groupId> | |
| 200 | + <artifactId>spring-boot-maven-plugin</artifactId> | |
| 201 | + </plugin> | |
| 202 | + </plugins> | |
| 203 | + <resources> | |
| 204 | + <resource> | |
| 205 | + <directory>src/main/resources</directory> | |
| 206 | + <filtering>false</filtering> | |
| 207 | + </resource> | |
| 208 | + </resources> | |
| 209 | + </build> | |
| 210 | + <repositories> | |
| 211 | + <repository> | |
| 212 | + <id>spring-snapshots</id> | |
| 213 | + <url>http://repo.spring.io/snapshot</url> | |
| 214 | + <snapshots> | |
| 215 | + <enabled>true</enabled> | |
| 216 | + </snapshots> | |
| 217 | + </repository> | |
| 218 | + <repository> | |
| 219 | + <id>spring-milestones</id> | |
| 220 | + <url>http://repo.spring.io/milestone</url> | |
| 221 | + </repository> | |
| 222 | + </repositories> | |
| 223 | + <pluginRepositories> | |
| 224 | + <pluginRepository> | |
| 225 | + <id>spring-snapshots</id> | |
| 226 | + <url>http://repo.spring.io/snapshot</url> | |
| 227 | + </pluginRepository> | |
| 228 | + <pluginRepository> | |
| 229 | + <id>spring-milestones</id> | |
| 230 | + <url>http://repo.spring.io/milestone</url> | |
| 231 | + </pluginRepository> | |
| 232 | + </pluginRepositories> | |
| 233 | + | |
| 234 | + <properties> | |
| 235 | + <start-class>com.bsth.Application</start-class> | |
| 236 | + </properties> | |
| 237 | +</project> | ... | ... |
src/main/java/com/bsth/util/AppProperties.java
0 → 100644
| 1 | +package com.bsth.util; | |
| 2 | + | |
| 3 | +import org.springframework.beans.factory.annotation.Value; | |
| 4 | +import org.springframework.stereotype.Component; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * @author Hill | |
| 8 | + */ | |
| 9 | +@Component | |
| 10 | +public class AppProperties { | |
| 11 | + | |
| 12 | + private static int cacheDays; | |
| 13 | + | |
| 14 | + private static String controlUrl; | |
| 15 | + | |
| 16 | + private static String secretKey; | |
| 17 | + | |
| 18 | + private static String gpsUrl; | |
| 19 | + | |
| 20 | + @Value("${cache.days}") | |
| 21 | + public void setCacheDays(int cacheDays) { | |
| 22 | + AppProperties.cacheDays = cacheDays; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public static int getCacheDays() { | |
| 26 | + return cacheDays; | |
| 27 | + } | |
| 28 | + | |
| 29 | + @Value("${http.control.service_data_url}") | |
| 30 | + public void setControlUrl(String url) { | |
| 31 | + AppProperties.controlUrl = url; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public static String getControlUrl() { | |
| 35 | + return controlUrl; | |
| 36 | + } | |
| 37 | + | |
| 38 | + @Value("${http.control.secret.key}") | |
| 39 | + public void setSecretKey(String secretKey) { | |
| 40 | + AppProperties.secretKey = secretKey; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public static String getSecretKey() { | |
| 44 | + return secretKey; | |
| 45 | + } | |
| 46 | + | |
| 47 | + @Value("${http.gps.real.url}") | |
| 48 | + public void setGpsUrl(String url) { | |
| 49 | + AppProperties.gpsUrl = url; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public static String getGpsUrl() { | |
| 53 | + return gpsUrl; | |
| 54 | + } | |
| 55 | +} | ... | ... |