Restructure 'bootstrap' to use 'zero'
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.bootstrap.sample.ui;
|
||||
package org.springframework.zero.sample.web.ui;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
@@ -11,7 +11,7 @@
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.bootstrap.sample.ui;
|
||||
package org.springframework.zero.sample.web.ui;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.bootstrap.sample.ui;
|
||||
package org.springframework.zero.sample.web.ui;
|
||||
|
||||
/**
|
||||
* @author Rob Winch
|
||||
@@ -14,19 +14,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.bootstrap.sample.ui;
|
||||
package org.springframework.zero.sample.web.ui;
|
||||
|
||||
import org.springframework.bootstrap.SpringApplication;
|
||||
import org.springframework.bootstrap.context.annotation.EnableAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.zero.SpringApplication;
|
||||
import org.springframework.zero.context.annotation.EnableAutoConfiguration;
|
||||
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@ComponentScan
|
||||
public class UiBootstrapApplication {
|
||||
public class SampleWebUiApplication {
|
||||
|
||||
@Bean
|
||||
public MessageRepository messageRepository() {
|
||||
@@ -44,7 +44,7 @@ public class UiBootstrapApplication {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
SpringApplication.run(UiBootstrapApplication.class, args);
|
||||
SpringApplication.run(SampleWebUiApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,13 +11,11 @@
|
||||
* specific language governing permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.bootstrap.sample.ui.mvc;
|
||||
package org.springframework.zero.sample.web.ui.mvc;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.bootstrap.sample.ui.Message;
|
||||
import org.springframework.bootstrap.sample.ui.MessageRepository;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -26,6 +24,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import org.springframework.zero.sample.web.ui.Message;
|
||||
import org.springframework.zero.sample.web.ui.MessageRepository;
|
||||
|
||||
/**
|
||||
* @author Rob Winch
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.bootstrap.sample.ui;
|
||||
package org.springframework.zero.sample.web.ui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
@@ -10,7 +10,6 @@ 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;
|
||||
@@ -19,6 +18,7 @@ import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.client.DefaultResponseErrorHandler;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.zero.SpringApplication;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
@@ -28,9 +28,8 @@ import static org.junit.Assert.assertTrue;
|
||||
* Basic integration tests for demo application.
|
||||
*
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
public class UiBootstrapApplicationTests {
|
||||
public class SampleWebUiApplicationTests {
|
||||
|
||||
private static ConfigurableApplicationContext context;
|
||||
|
||||
@@ -42,7 +41,7 @@ public class UiBootstrapApplicationTests {
|
||||
@Override
|
||||
public ConfigurableApplicationContext call() throws Exception {
|
||||
return (ConfigurableApplicationContext) SpringApplication
|
||||
.run(UiBootstrapApplication.class);
|
||||
.run(SampleWebUiApplication.class);
|
||||
}
|
||||
});
|
||||
context = future.get(30, TimeUnit.SECONDS);
|
||||
@@ -3,4 +3,4 @@ handlers = java.util.logging.ConsoleHandler
|
||||
|
||||
java.util.logging.ConsoleHandler.level = FINE
|
||||
sun.net.www.protocol.http.HttpURLConnection.level = ALL
|
||||
org.springframework.bootstrap.context.annotation.level = ALL
|
||||
org.springframework.zero.context.annotation.level = ALL
|
||||
|
||||
Reference in New Issue
Block a user