Restructure 'bootstrap' to use 'zero'

This commit is contained in:
Phillip Webb
2013-07-05 16:44:24 -07:00
parent d039822064
commit 261955c50b
443 changed files with 1361 additions and 1774 deletions

View File

@@ -14,20 +14,20 @@
* limitations under the License.
*/
package org.springframework.bootstrap.sample.jetty;
package org.springframework.zero.sample.jetty;
import org.springframework.bootstrap.SpringApplication;
import org.springframework.bootstrap.context.annotation.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.zero.SpringApplication;
import org.springframework.zero.context.annotation.EnableAutoConfiguration;
@Configuration
@EnableAutoConfiguration
@ComponentScan
public class JettyBootstrapApplication {
public class SampleJettyApplication {
public static void main(String[] args) throws Exception {
SpringApplication.run(JettyBootstrapApplication.class, args);
SpringApplication.run(SampleJettyApplication.class, args);
}
}

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.bootstrap.sample.jetty.service;
package org.springframework.zero.sample.jetty.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

View File

@@ -14,13 +14,13 @@
* limitations under the License.
*/
package org.springframework.bootstrap.sample.jetty.web;
package org.springframework.zero.sample.jetty.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.bootstrap.sample.jetty.service.HelloWorldService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.zero.sample.jetty.service.HelloWorldService;
@Controller
public class SampleController {

View File

@@ -1,4 +1,4 @@
package org.springframework.bootstrap.sample.jetty;
package org.springframework.zero.sample.jetty;
import java.io.IOException;
import java.util.concurrent.Callable;
@@ -9,13 +9,13 @@ import java.util.concurrent.TimeUnit;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.bootstrap.SpringApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.web.client.DefaultResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
import org.springframework.zero.SpringApplication;
import static org.junit.Assert.assertEquals;
@@ -23,9 +23,8 @@ import static org.junit.Assert.assertEquals;
* Basic integration tests for demo application.
*
* @author Dave Syer
*
*/
public class JettyBootstrapApplicationTests {
public class SampleJettyApplicationTests {
private static ConfigurableApplicationContext context;
@@ -37,7 +36,7 @@ public class JettyBootstrapApplicationTests {
@Override
public ConfigurableApplicationContext call() throws Exception {
return (ConfigurableApplicationContext) SpringApplication
.run(JettyBootstrapApplication.class);
.run(SampleJettyApplication.class);
}
});
context = future.get(10, TimeUnit.SECONDS);