Moved classes in -config back to config package.
Added a test to verify that the SampleZookeeperApplication runs fixes gh-26
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.zookeeper.common;
|
||||
package org.springframework.cloud.zookeeper.config;
|
||||
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.cloud.zookeeper.ZookeeperAutoConfiguration;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.zookeeper.common;
|
||||
package org.springframework.cloud.zookeeper.config;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.zookeeper.common;
|
||||
package org.springframework.cloud.zookeeper.config;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.cloud.zookeeper.common;
|
||||
package org.springframework.cloud.zookeeper.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -45,6 +45,11 @@
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@EnableDiscoveryClient
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class SampleApplication {
|
||||
public class SampleZookeeperApplication {
|
||||
|
||||
@Value("${spring.application.name:testZookeeperApp}")
|
||||
private String appName;
|
||||
@@ -39,7 +39,7 @@ public class SampleApplication {
|
||||
private RelaxedPropertyResolver resolver;
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(SampleApplication.class, args);
|
||||
SpringApplication.run(SampleZookeeperApplication.class, args);
|
||||
}
|
||||
|
||||
@RequestMapping("/")
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright 2013-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.zookeeper.sample;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringApplicationConfiguration(classes = SampleZookeeperApplication.class)
|
||||
public class SampleApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {}
|
||||
}
|
||||
Reference in New Issue
Block a user