Commit f448e79f authored by Dave Syer's avatar Dave Syer

Remove long package names from samples

Long package names are really unnecessary in samples and they
just clutter things up. Also Spring Loaded doesn't work with
org.sfw packages, so to demo that technology you need a
different package name.
parent 3c7361fb
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator.log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator.log4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator.log4j;
package sample.actuator.log4j;
import java.util.Collections;
import java.util.Map;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator.log4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator.log4j;
package sample.actuator.log4j;
import java.io.IOException;
import java.util.Map;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator.ui;
package sample.actuator.ui;
import java.util.Date;
import java.util.Map;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator.ui;
package sample.actuator.ui;
import static org.junit.Assert.assertEquals;
......@@ -29,7 +29,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.sample.actuator.ui.SampleActuatorUiApplication;
import sample.actuator.ui.SampleActuatorUiApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator.ui;
package sample.actuator.ui;
import java.io.IOException;
import java.util.Arrays;
......@@ -28,7 +28,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.sample.actuator.ui.SampleActuatorUiApplication;
import sample.actuator.ui.SampleActuatorUiApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator.log4j;
package sample.actuator;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator.log4j;
package sample.actuator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import java.util.Collections;
import java.util.Map;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator.log4j;
package sample.actuator;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import java.io.IOException;
import java.util.ArrayList;
......@@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.sample.actuator.SampleActuatorApplication;
import sample.actuator.SampleActuatorApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpRequest;
import org.springframework.http.HttpStatus;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import static org.junit.Assert.assertEquals;
......@@ -32,7 +32,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.sample.actuator.SampleActuatorApplication;
import sample.actuator.SampleActuatorApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpRequest;
import org.springframework.http.HttpStatus;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import java.io.IOException;
import java.util.Map;
......@@ -27,7 +27,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.sample.actuator.SampleActuatorApplication;
import sample.actuator.SampleActuatorApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import java.io.IOException;
import java.util.ArrayList;
......@@ -30,7 +30,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.sample.actuator.SampleActuatorApplication;
import sample.actuator.SampleActuatorApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpRequest;
import org.springframework.http.HttpStatus;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
......@@ -36,7 +36,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.sample.actuator.SampleActuatorApplication;
import sample.actuator.SampleActuatorApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import java.io.IOException;
import java.util.ArrayList;
......@@ -30,7 +30,7 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.sample.actuator.SampleActuatorApplication;
import sample.actuator.SampleActuatorApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpRequest;
import org.springframework.http.HttpStatus;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
......@@ -31,7 +31,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.sample.actuator.SampleActuatorApplication;
import sample.actuator.SampleActuatorApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import java.io.IOException;
import java.util.Map;
......@@ -27,7 +27,7 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.sample.actuator.SampleActuatorApplication;
import sample.actuator.SampleActuatorApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.amqp;
package sample.amqp;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.amqp;
package sample.amqp;
import javax.annotation.PostConstruct;
......
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package org.springframework.boot.sample.aop;
package sample.aop;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.sample.aop.service.HelloWorldService;
import sample.aop.service.HelloWorldService;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.aop.monitor;
package sample.aop.monitor;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.aop.service;
package sample.aop.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
......
......@@ -14,14 +14,14 @@
* limitations under the License.
*/
package org.springframework.boot.sample.aop;
package sample.aop;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.boot.OutputCapture;
import org.springframework.boot.sample.aop.SampleAopApplication;
import sample.aop.SampleAopApplication;
import static org.junit.Assert.assertTrue;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.batch;
package sample.batch;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.batch;
package sample.batch;
import org.junit.Rule;
import org.junit.Test;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa;
package sample.data.jpa;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.domain;
package sample.data.jpa.domain;
import java.io.Serializable;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.domain;
package sample.data.jpa.domain;
import java.io.Serializable;
import java.util.Set;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.domain;
package sample.data.jpa.domain;
import java.io.Serializable;
import java.math.BigDecimal;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.domain;
package sample.data.jpa.domain;
public enum Rating {
TERRIBLE, POOR, AVERAGE, GOOD, EXCELLENT,
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.domain;
package sample.data.jpa.domain;
import java.io.Serializable;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.domain;
package sample.data.jpa.domain;
import java.io.Serializable;
import java.util.Date;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.domain;
package sample.data.jpa.domain;
import java.io.Serializable;
import java.util.Date;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.domain;
package sample.data.jpa.domain;
public enum TripType {
BUSINESS, COUPLES, FAMILY, FRIENDS, SOLO
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import org.springframework.boot.sample.data.jpa.domain.City;
import sample.data.jpa.domain.City;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.Repository;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import java.io.Serializable;
......
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import org.springframework.boot.sample.data.jpa.domain.City;
import org.springframework.boot.sample.data.jpa.domain.HotelSummary;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.HotelSummary;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
......
......@@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.sample.data.jpa.domain.City;
import org.springframework.boot.sample.data.jpa.domain.HotelSummary;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.HotelSummary;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;
......
......@@ -14,28 +14,29 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import java.util.List;
import org.springframework.boot.sample.data.jpa.domain.City;
import org.springframework.boot.sample.data.jpa.domain.Hotel;
import org.springframework.boot.sample.data.jpa.domain.HotelSummary;
import org.springframework.boot.sample.data.jpa.domain.RatingCount;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.HotelSummary;
import sample.data.jpa.domain.RatingCount;
interface HotelRepository extends Repository<Hotel, Long> {
Hotel findByCityAndName(City city, String name);
@Query("select new org.springframework.boot.sample.data.jpa.domain.HotelSummary(h.city, h.name, avg(r.rating)) "
@Query("select new sample.data.jpa.domain.HotelSummary(h.city, h.name, avg(r.rating)) "
+ "from Hotel h left outer join h.reviews r where h.city = ?1 group by h")
Page<HotelSummary> findByCity(City city, Pageable pageable);
@Query("select new org.springframework.boot.sample.data.jpa.domain.RatingCount(r.rating, count(r)) "
@Query("select new sample.data.jpa.domain.RatingCount(r.rating, count(r)) "
+ "from Review r where r.hotel = ?1 group by r.rating order by r.rating DESC")
List<RatingCount> findRatingCounts(Hotel hotel);
}
......@@ -14,12 +14,12 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import org.springframework.boot.sample.data.jpa.domain.City;
import org.springframework.boot.sample.data.jpa.domain.Hotel;
import org.springframework.boot.sample.data.jpa.domain.Review;
import org.springframework.boot.sample.data.jpa.domain.ReviewDetails;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.Review;
import sample.data.jpa.domain.ReviewDetails;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
......
......@@ -14,19 +14,19 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.sample.data.jpa.domain.City;
import org.springframework.boot.sample.data.jpa.domain.Hotel;
import org.springframework.boot.sample.data.jpa.domain.Rating;
import org.springframework.boot.sample.data.jpa.domain.RatingCount;
import org.springframework.boot.sample.data.jpa.domain.Review;
import org.springframework.boot.sample.data.jpa.domain.ReviewDetails;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.Rating;
import sample.data.jpa.domain.RatingCount;
import sample.data.jpa.domain.Review;
import sample.data.jpa.domain.ReviewDetails;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;
......
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import org.springframework.boot.sample.data.jpa.domain.Hotel;
import org.springframework.boot.sample.data.jpa.domain.Review;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.Review;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.Repository;
......
......@@ -14,9 +14,9 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import org.springframework.boot.sample.data.jpa.domain.Rating;
import sample.data.jpa.domain.Rating;
public interface ReviewsSummary {
......
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.web;
package sample.data.jpa.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.sample.data.jpa.service.CityService;
import sample.data.jpa.service.CityService;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
......
package org.springframework.boot.sample.data.jpa;
package sample.data.jpa;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.is;
......@@ -22,8 +22,8 @@ import static org.junit.Assert.assertThat;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.sample.data.jpa.SampleDataJpaApplication;
import org.springframework.boot.sample.data.jpa.domain.City;
import sample.data.jpa.SampleDataJpaApplication;
import sample.data.jpa.domain.City;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
......
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.sample.data.jpa.service;
package sample.data.jpa.service;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.hasSize;
......@@ -25,12 +25,12 @@ import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.sample.data.jpa.SampleDataJpaApplication;
import org.springframework.boot.sample.data.jpa.domain.City;
import org.springframework.boot.sample.data.jpa.domain.Hotel;
import org.springframework.boot.sample.data.jpa.domain.HotelSummary;
import org.springframework.boot.sample.data.jpa.domain.Rating;
import org.springframework.boot.sample.data.jpa.domain.RatingCount;
import sample.data.jpa.SampleDataJpaApplication;
import sample.data.jpa.domain.City;
import sample.data.jpa.domain.Hotel;
import sample.data.jpa.domain.HotelSummary;
import sample.data.jpa.domain.Rating;
import sample.data.jpa.domain.RatingCount;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.mongo;
package sample.data.mongo;
import org.springframework.data.annotation.Id;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.mongo;
package sample.data.mongo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.redis;
package sample.data.redis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.redis;
package sample.data.redis;
import static org.junit.Assert.assertTrue;
......@@ -23,7 +23,7 @@ import java.io.IOException;
import org.junit.Rule;
import org.junit.Test;
import org.springframework.boot.OutputCapture;
import org.springframework.boot.sample.data.redis.SampleRedisApplication;
import sample.data.redis.SampleRedisApplication;
import org.springframework.core.NestedCheckedException;
/**
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.integration;
package sample.integration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.integration;
package sample.integration;
import java.io.File;
import java.io.FileInputStream;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.integration;
package sample.integration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.integration;
package sample.integration;
import org.springframework.boot.context.properties.ConfigurationProperties;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.integration.consumer;
package sample.integration.consumer;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
......@@ -25,8 +25,8 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.sample.integration.SampleIntegrationApplication;
import org.springframework.boot.sample.integration.producer.ProducerApplication;
import sample.integration.SampleIntegrationApplication;
import sample.integration.producer.ProducerApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.integration.producer;
package sample.integration.producer;
import java.io.File;
import java.io.FileOutputStream;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.jetty;
package sample.jetty;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.xml.service;
package sample.jetty.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
......
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.springframework.boot.sample.jetty.web;
package sample.jetty.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.sample.jetty.service.HelloWorldService;
import sample.jetty.service.HelloWorldService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.jetty;
package sample.jetty;
import java.io.IOException;
import java.util.concurrent.Callable;
......
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package org.springframework.boot.sample.profile;
package sample.profile;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.sample.profile.service.MessageService;
import sample.profile.service.MessageService;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.profile.service;
package sample.profile.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.profile.service;
package sample.profile.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.profile.service;
package sample.profile.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.profile.service;
package sample.profile.service;
/**
* @author Dave Syer
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.profile;
package sample.profile;
import org.junit.After;
import org.junit.Before;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.ops.ui;
package sample.ops.ui;
import java.util.Date;
import java.util.Map;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.ops.ui;
package sample.ops.ui;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
......
/*
* Copyright 2012-2013 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.boot.sample.simple.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class HelloWorldService {
@Value("${name:World}")
private String name;
public String getHelloMessage() {
return "Hello " + this.name;
}
}
......@@ -14,13 +14,13 @@
* limitations under the License.
*/
package org.springframework.boot.sample.simple;
package sample.simple;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.sample.simple.service.HelloWorldService;
import sample.simple.service.HelloWorldService;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.jetty.service;
package sample.simple.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.simple;
package sample.simple;
import org.junit.After;
import org.junit.Before;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.simple;
package sample.simple;
import org.junit.Test;
import org.junit.runner.RunWith;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.tomcat;
package sample.tomcat;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.tomcat.service;
package sample.tomcat.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
......
......@@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.springframework.boot.sample.tomcat.web;
package sample.tomcat.web;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.sample.tomcat.service.HelloWorldService;
import sample.tomcat.service.HelloWorldService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.tomcat;
package sample.tomcat;
import java.io.IOException;
import java.util.concurrent.Callable;
......@@ -31,8 +31,8 @@ import org.springframework.boot.autoconfigure.web.DispatcherServletAutoConfigura
import org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration;
import org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration;
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration;
import org.springframework.boot.sample.tomcat.service.HelloWorldService;
import org.springframework.boot.sample.tomcat.web.SampleController;
import sample.tomcat.service.HelloWorldService;
import sample.tomcat.web.SampleController;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.tomcat;
package sample.tomcat;
import java.io.IOException;
import java.util.concurrent.Callable;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.traditional;
package sample.traditional;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.traditional.config;
package sample.traditional.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.traditional;
package sample.traditional;
import java.io.IOException;
import java.util.concurrent.Callable;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.jsp;
package sample.jsp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.ui;
package sample.ui;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.ui;
package sample.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.boot.sample.ui;
package sample.ui;
import java.util.Calendar;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment