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.
This commit is contained in:
Dave Syer 2013-12-31 08:40:21 +00:00
parent 3c7361fb3e
commit f448e79f29
124 changed files with 223 additions and 222 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.actuator;
package sample.actuator;
import static org.junit.Assert.assertNotNull;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.amqp;
package sample.amqp;
import javax.annotation.PostConstruct;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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,

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -1,4 +1,4 @@
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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.mongo;
package sample.data.mongo;
import java.util.List;

View File

@ -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;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.data.mongo;
package sample.data.mongo;
import static org.junit.Assert.assertTrue;

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.integration;
package sample.integration;
import org.springframework.boot.context.properties.ConfigurationProperties;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.profile.service;
package sample.profile.service;
/**
* @author Dave Syer

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.boot.sample.servlet;
package sample.servlet;
import java.io.IOException;

View File

@ -1,32 +0,0 @@
/*
* 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;
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,4 @@
package org.springframework.boot.sample.jsp;
package sample.jsp;
import java.io.IOException;
import java.util.concurrent.Callable;

View File

@ -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;

View File

@ -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;

View File

@ -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;

Some files were not shown because too many files have changed in this diff Show More