Skip to content

Commit

Permalink
去掉spring-support的引用,减少依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-lee committed Oct 9, 2015
1 parent dbfc469 commit 45c3365
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 115 deletions.
44 changes: 7 additions & 37 deletions config-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,20 @@
<aspectj.version>1.8.7</aspectj.version>
<jackson.version>2.2.0</jackson.version>
<jetty.version>9.0.1.v20130408</jetty.version>
<joda-time.version>2.8.2</joda-time.version>
</properties>

<dependencies>
<dependency>
<groupId>com.github.colin-lee</groupId>
<artifactId>spring-support</artifactId>
<artifactId>config-core</artifactId>
<version>${autoconf.version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
</dependency>
<!-- Spring core & mvc -->
<dependency>
<groupId>org.springframework</groupId>
Expand Down Expand Up @@ -104,42 +110,6 @@
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.7.3</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.6.0.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-bean</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- shiro -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.google.common.collect.Lists;
import com.google.common.hash.HashCode;
import com.google.common.hash.Hashing;
import com.google.common.io.BaseEncoding;
import org.apache.curator.framework.CuratorFramework;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooDefs;
Expand All @@ -19,7 +20,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import sun.misc.BASE64Encoder;

import javax.annotation.PostConstruct;
import java.util.List;
Expand Down Expand Up @@ -47,7 +47,7 @@ public class PublishService {
void init() {
client = ConfigHelper.getDefaultClient();
HashCode hash = Hashing.sha1().newHasher().putString(auth, Charsets.UTF_8).hash();
String encoded = new BASE64Encoder().encode(hash.asBytes());
String encoded = BaseEncoding.base64().encode(hash.asBytes());
int pos = auth.indexOf(':');
if (pos == -1) {
return;
Expand Down
12 changes: 0 additions & 12 deletions config-web/src/main/resources/spring/spring-cms.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:c="http://www.springframework.org/schema/c"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!--
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
p:systemPropertiesModeName="SYSTEM_PROPERTIES_MODE_OVERRIDE"
p:ignoreResourceNotFound="true"
p:location="classpath:application.properties"/>
-->

<bean class="com.github.autoconf.spring.reloadable.ReloadablePropertyPostProcessor"
c:placeholderConfigurer-ref="autoConfig"/>

<bean id="autoConfig"
class="com.github.autoconf.spring.reloadable.ReloadablePropertySourcesPlaceholderConfigurer"
p:ignoreResourceNotFound="true"
p:ignoreUnresolvablePlaceholders="false"
p:location="classpath:application.properties"/>
</beans>
32 changes: 0 additions & 32 deletions config-web/src/main/resources/spring/spring-redis.xml

This file was deleted.

32 changes: 0 additions & 32 deletions config-web/src/test/java/com/github/autoconf/web/ConfigTest.java

This file was deleted.

0 comments on commit 45c3365

Please sign in to comment.