From 4a58171b5cd6aa5cad021f6e5c8636724eb86e27 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 12 Feb 2014 12:16:17 -0800 Subject: [PATCH] A few more package tweaks Improve package structure and include package-info javadoc. --- ...ConfigurationReportLoggingInitializer.java | 2 +- .../boot/autoconfigure/package-info.java | 23 ++++++++++++++++++ .../DispatcherServletAutoConfiguration.java | 2 +- ...gurationReportLoggingInitializerTests.java | 2 +- .../SecurityAutoConfigurationTests.java | 2 +- .../servlet/SampleServletApplication.java | 2 +- .../sample/jsp/SampleWebJspApplication.java | 2 +- .../sample/ui/SampleWebStaticApplication.java | 2 +- .../config/SampleWebSocketsApplication.java | 2 +- .../boot/ansi/package-info.java | 23 ++++++++++++++++++ .../boot/bind/package-info.java | 24 +++++++++++++++++++ ...tContextApplicationContextInitializer.java | 2 +- ...arentContextCloserApplicationListener.java | 4 ++-- .../builder/SpringApplicationBuilder.java | 2 -- .../boot/builder/package-info.java | 23 ++++++++++++++++++ .../cloudfoundry/VcapApplicationListener.java | 4 ++-- .../boot/cloudfoundry/package-info.java | 21 ++++++++++++++++ .../FileEncodingApplicationListener.java | 4 ++-- .../config/ConfigFileApplicationListener.java | 6 ++--- ...DelegateApplicationContextInitializer.java | 2 +- ...nvironmentDelegateApplicationListener.java | 4 ++-- .../config/RandomValuePropertySource.java | 2 +- .../boot/context/config/package-info.java | 24 +++++++++++++++++++ .../context/embedded/jetty/package-info.java | 2 ++ .../boot/context/embedded/package-info.java | 1 + .../context/embedded/tomcat/package-info.java | 2 ++ .../ApplicationEnvironmentPreparedEvent.java | 2 +- .../event/ApplicationFailedEvent.java | 2 +- .../event/ApplicationPreparedEvent.java | 2 +- .../event/ApplicationStartedEvent.java | 2 +- .../event/EventPublishingRunParticipant.java | 2 +- .../event/SpringApplicationEvent.java | 2 +- .../boot/context/package-info.java | 21 ++++++++++++++++ .../boot/context/properties/package-info.java | 24 +++++++++++++++++++ .../web/SpringBootServletInitializer.java | 5 ++-- .../boot/context/web/package-info.java | 22 +++++++++++++++++ .../boot/env/package-info.java | 21 ++++++++++++++++ .../boot/json/package-info.java | 23 ++++++++++++++++++ ...baseServiceLocatorApplicationListener.java | 2 +- .../boot/liquibase/package-info.java | 23 ++++++++++++++++++ .../ClasspathLoggingApplicationListener.java | 4 ++-- .../logging/LoggingApplicationListener.java | 4 ++-- .../boot/logging/java/package-info.java | 21 ++++++++++++++++ .../boot/logging/log4j/package-info.java | 21 ++++++++++++++++ .../boot/logging/logback/package-info.java | 21 ++++++++++++++++ .../boot/logging/package-info.java | 23 ++++++++++++++++++ .../boot/orm/jpa/package-info.java | 21 ++++++++++++++++ .../springframework/boot/package-info.java | 23 ++++++++++++++++++ .../boot/yaml/package-info.java | 24 +++++++++++++++++++ .../main/resources/META-INF/spring.factories | 10 ++++---- .../VcapApplicationListenerTests.java | 2 +- .../FileEncodingApplicationListenerTests.java | 2 +- .../ConfigFileApplicationListenerTests.java | 7 +++--- ...ateApplicationContextInitializerTests.java | 3 ++- ...nmentDelegateApplicationListenerTests.java | 5 ++-- .../LoggingApplicationListenerTests.java | 2 +- 56 files changed, 483 insertions(+), 52 deletions(-) create mode 100644 spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/ansi/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/bind/package-info.java rename spring-boot/src/main/java/org/springframework/boot/{context => builder}/ParentContextApplicationContextInitializer.java (98%) rename spring-boot/src/main/java/org/springframework/boot/{context => builder}/ParentContextCloserApplicationListener.java (95%) create mode 100644 spring-boot/src/main/java/org/springframework/boot/builder/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/cloudfoundry/package-info.java rename spring-boot/src/main/java/org/springframework/boot/{ => context}/config/ConfigFileApplicationListener.java (98%) rename spring-boot/src/main/java/org/springframework/boot/context/{env => config}/EnvironmentDelegateApplicationContextInitializer.java (98%) rename spring-boot/src/main/java/org/springframework/boot/context/{env => config}/EnvironmentDelegateApplicationListener.java (96%) rename spring-boot/src/main/java/org/springframework/boot/{ => context}/config/RandomValuePropertySource.java (97%) create mode 100644 spring-boot/src/main/java/org/springframework/boot/context/config/package-info.java rename spring-boot/src/main/java/org/springframework/boot/{ => context}/event/ApplicationEnvironmentPreparedEvent.java (97%) rename spring-boot/src/main/java/org/springframework/boot/{ => context}/event/ApplicationFailedEvent.java (97%) rename spring-boot/src/main/java/org/springframework/boot/{ => context}/event/ApplicationPreparedEvent.java (97%) rename spring-boot/src/main/java/org/springframework/boot/{ => context}/event/ApplicationStartedEvent.java (97%) rename spring-boot/src/main/java/org/springframework/boot/{ => context}/event/EventPublishingRunParticipant.java (98%) rename spring-boot/src/main/java/org/springframework/boot/{ => context}/event/SpringApplicationEvent.java (96%) create mode 100644 spring-boot/src/main/java/org/springframework/boot/context/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/context/properties/package-info.java rename spring-boot/src/main/java/org/springframework/boot/{ => context}/web/SpringBootServletInitializer.java (95%) create mode 100644 spring-boot/src/main/java/org/springframework/boot/context/web/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/env/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/json/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/liquibase/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/logging/java/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/logging/log4j/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/logging/logback/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/logging/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/orm/jpa/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/package-info.java create mode 100644 spring-boot/src/main/java/org/springframework/boot/yaml/package-info.java rename spring-boot/src/test/java/org/springframework/boot/{ => context}/config/ConfigFileApplicationListenerTests.java (98%) rename spring-boot/src/test/java/org/springframework/boot/context/{env => config}/EnvironmentDelegateApplicationContextInitializerTests.java (96%) rename spring-boot/src/test/java/org/springframework/boot/context/{env => config}/EnvironmentDelegateApplicationListenerTests.java (94%) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializer.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializer.java index cb76baf458..93a5c4af69 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializer.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializer.java @@ -23,7 +23,7 @@ import org.apache.commons.logging.LogFactory; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcome; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes; -import org.springframework.boot.event.ApplicationFailedEvent; +import org.springframework.boot.context.event.ApplicationFailedEvent; import org.springframework.boot.logging.LogLevel; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ApplicationEvent; diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/package-info.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/package-info.java new file mode 100644 index 0000000000..07a2ded03b --- /dev/null +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Spring Boot's auto-configuration capabilities. + * + * @see org.springframework.boot.autoconfigure.EnableAutoConfiguration + */ +package org.springframework.boot.autoconfigure; + diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DispatcherServletAutoConfiguration.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DispatcherServletAutoConfiguration.java index b38b3a63f1..a9900607f2 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DispatcherServletAutoConfiguration.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/DispatcherServletAutoConfiguration.java @@ -28,7 +28,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.autoconfigure.condition.SpringBootCondition; import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory; -import org.springframework.boot.web.SpringBootServletInitializer; +import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ConditionContext; import org.springframework.context.annotation.Conditional; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializerTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializerTests.java index 4a782132bb..26f738fbd3 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializerTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializerTests.java @@ -34,7 +34,7 @@ import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfigurati import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport; import org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration; import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration; -import org.springframework.boot.event.ApplicationFailedEvent; +import org.springframework.boot.context.event.ApplicationFailedEvent; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java index d9baf27d90..8ca76e3a25 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java @@ -24,7 +24,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer; import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; import org.springframework.boot.autoconfigure.orm.jpa.test.City; -import org.springframework.boot.event.ApplicationPreparedEvent; +import org.springframework.boot.context.event.ApplicationPreparedEvent; import org.springframework.boot.logging.LoggingApplicationListener; import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.context.annotation.Bean; diff --git a/spring-boot-samples/spring-boot-sample-servlet/src/main/java/sample/servlet/SampleServletApplication.java b/spring-boot-samples/spring-boot-sample-servlet/src/main/java/sample/servlet/SampleServletApplication.java index 14f8727258..1342853c63 100644 --- a/spring-boot-samples/spring-boot-sample-servlet/src/main/java/sample/servlet/SampleServletApplication.java +++ b/spring-boot-samples/spring-boot-sample-servlet/src/main/java/sample/servlet/SampleServletApplication.java @@ -27,7 +27,7 @@ import javax.servlet.ServletResponse; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.SpringBootServletInitializer; +import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-samples/spring-boot-sample-web-jsp/src/main/java/sample/jsp/SampleWebJspApplication.java b/spring-boot-samples/spring-boot-sample-web-jsp/src/main/java/sample/jsp/SampleWebJspApplication.java index 9a5d48e290..1775fd0e45 100644 --- a/spring-boot-samples/spring-boot-sample-web-jsp/src/main/java/sample/jsp/SampleWebJspApplication.java +++ b/spring-boot-samples/spring-boot-sample-web-jsp/src/main/java/sample/jsp/SampleWebJspApplication.java @@ -19,7 +19,7 @@ package sample.jsp; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.SpringBootServletInitializer; +import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot-samples/spring-boot-sample-web-static/src/main/java/sample/ui/SampleWebStaticApplication.java b/spring-boot-samples/spring-boot-sample-web-static/src/main/java/sample/ui/SampleWebStaticApplication.java index 9e338afb1e..227853dde4 100644 --- a/spring-boot-samples/spring-boot-sample-web-static/src/main/java/sample/ui/SampleWebStaticApplication.java +++ b/spring-boot-samples/spring-boot-sample-web-static/src/main/java/sample/ui/SampleWebStaticApplication.java @@ -19,7 +19,7 @@ package sample.ui; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.SpringBootServletInitializer; +import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.context.annotation.Configuration; @Configuration diff --git a/spring-boot-samples/spring-boot-sample-websocket/src/main/java/samples/websocket/config/SampleWebSocketsApplication.java b/spring-boot-samples/spring-boot-sample-websocket/src/main/java/samples/websocket/config/SampleWebSocketsApplication.java index ce28999b3a..6233fd048c 100644 --- a/spring-boot-samples/spring-boot-sample-websocket/src/main/java/samples/websocket/config/SampleWebSocketsApplication.java +++ b/spring-boot-samples/spring-boot-sample-websocket/src/main/java/samples/websocket/config/SampleWebSocketsApplication.java @@ -19,7 +19,7 @@ package samples.websocket.config; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.SpringBootServletInitializer; +import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.socket.WebSocketHandler; diff --git a/spring-boot/src/main/java/org/springframework/boot/ansi/package-info.java b/spring-boot/src/main/java/org/springframework/boot/ansi/package-info.java new file mode 100644 index 0000000000..efdd3df8dd --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/ansi/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Support classes to provide ANSI color output. + * + * @see org.springframework.boot.ansi.AnsiOutput + */ +package org.springframework.boot.ansi; + diff --git a/spring-boot/src/main/java/org/springframework/boot/bind/package-info.java b/spring-boot/src/main/java/org/springframework/boot/bind/package-info.java new file mode 100644 index 0000000000..c7aec5da54 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/bind/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Classes and utilities to help when binding spring based configuration files to objects. + * + * @see org.springframework.boot.bind.RelaxedDataBinder + * @see org.springframework.boot.bind.YamlConfigurationFactory + */ +package org.springframework.boot.bind; + diff --git a/spring-boot/src/main/java/org/springframework/boot/context/ParentContextApplicationContextInitializer.java b/spring-boot/src/main/java/org/springframework/boot/builder/ParentContextApplicationContextInitializer.java similarity index 98% rename from spring-boot/src/main/java/org/springframework/boot/context/ParentContextApplicationContextInitializer.java rename to spring-boot/src/main/java/org/springframework/boot/builder/ParentContextApplicationContextInitializer.java index 7b13cf97ff..4a4016cb5d 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/ParentContextApplicationContextInitializer.java +++ b/spring-boot/src/main/java/org/springframework/boot/builder/ParentContextApplicationContextInitializer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.context; +package org.springframework.boot.builder; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextInitializer; diff --git a/spring-boot/src/main/java/org/springframework/boot/context/ParentContextCloserApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/builder/ParentContextCloserApplicationListener.java similarity index 95% rename from spring-boot/src/main/java/org/springframework/boot/context/ParentContextCloserApplicationListener.java rename to spring-boot/src/main/java/org/springframework/boot/builder/ParentContextCloserApplicationListener.java index b161ea979a..0bede22ad9 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/ParentContextCloserApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/builder/ParentContextCloserApplicationListener.java @@ -14,9 +14,9 @@ * limitations under the License. */ -package org.springframework.boot.context; +package org.springframework.boot.builder; -import org.springframework.boot.context.ParentContextApplicationContextInitializer.ParentContextAvailableEvent; +import org.springframework.boot.builder.ParentContextApplicationContextInitializer.ParentContextAvailableEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.event.ContextClosedEvent; diff --git a/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java b/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java index bfc63a37c6..ec9aef8436 100644 --- a/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java +++ b/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java @@ -29,7 +29,6 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.springframework.beans.factory.support.BeanNameGenerator; import org.springframework.boot.SpringApplication; -import org.springframework.boot.context.ParentContextApplicationContextInitializer; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ApplicationListener; @@ -205,7 +204,6 @@ public class SpringApplicationBuilder { this.parent.context = parent; this.parent.running.set(true); initializers(new ParentContextApplicationContextInitializer(parent)); - return this; } diff --git a/spring-boot/src/main/java/org/springframework/boot/builder/package-info.java b/spring-boot/src/main/java/org/springframework/boot/builder/package-info.java new file mode 100644 index 0000000000..b3ce4ece67 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/builder/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Fluent 'builder' style API to construct a {@link org.springframework.boot.SpringApplication}. + * + * @see org.springframework.boot.builder.SpringApplicationBuilder + */ +package org.springframework.boot.builder; + diff --git a/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/VcapApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/VcapApplicationListener.java index cf35a079e7..714d425e10 100644 --- a/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/VcapApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/VcapApplicationListener.java @@ -26,8 +26,8 @@ import java.util.Properties; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.boot.config.ConfigFileApplicationListener; -import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.boot.context.config.ConfigFileApplicationListener; +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.json.JsonParser; import org.springframework.boot.json.JsonParserFactory; import org.springframework.context.ApplicationListener; diff --git a/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/package-info.java b/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/package-info.java new file mode 100644 index 0000000000..ecb66184c4 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/cloudfoundry/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Support for Cloud Foundry PAAS based deployment. + */ +package org.springframework.boot.cloudfoundry; + diff --git a/spring-boot/src/main/java/org/springframework/boot/context/FileEncodingApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/context/FileEncodingApplicationListener.java index f046d1db1c..619248f41f 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/FileEncodingApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/FileEncodingApplicationListener.java @@ -19,12 +19,12 @@ package org.springframework.boot.context; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.boot.bind.RelaxedPropertyResolver; -import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.context.ApplicationListener; import org.springframework.core.Ordered; /** - * An {@link ApplicationListener}that halts application startup if the system file + * An {@link ApplicationListener} that halts application startup if the system file * encoding does not match an expected value set in the environment. By default has no * effect, but if you set spring.mandatory_file_encoding (or some camelCase * or UPPERCASE variant of that) to the name of a character encoding (e.g. "UTF-8") then diff --git a/spring-boot/src/main/java/org/springframework/boot/config/ConfigFileApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java similarity index 98% rename from spring-boot/src/main/java/org/springframework/boot/config/ConfigFileApplicationListener.java rename to spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java index 64fc6ec9c9..3371d58308 100644 --- a/spring-boot/src/main/java/org/springframework/boot/config/ConfigFileApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.config; +package org.springframework.boot.context.config; import java.io.IOException; import java.util.ArrayList; @@ -33,9 +33,9 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.bind.PropertySourcesPropertyValues; import org.springframework.boot.bind.RelaxedDataBinder; +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.boot.context.event.ApplicationPreparedEvent; import org.springframework.boot.env.PropertySourcesLoader; -import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; -import org.springframework.boot.event.ApplicationPreparedEvent; import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.ConfigurableApplicationContext; diff --git a/spring-boot/src/main/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationContextInitializer.java b/spring-boot/src/main/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationContextInitializer.java similarity index 98% rename from spring-boot/src/main/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationContextInitializer.java rename to spring-boot/src/main/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationContextInitializer.java index 7b2c7803d5..4f14c31a6f 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationContextInitializer.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationContextInitializer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.context.env; +package org.springframework.boot.context.config; import java.util.ArrayList; import java.util.Collections; diff --git a/spring-boot/src/main/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationListener.java similarity index 96% rename from spring-boot/src/main/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationListener.java rename to spring-boot/src/main/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationListener.java index d3add41b7d..fa4997290d 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationListener.java @@ -14,13 +14,13 @@ * limitations under the License. */ -package org.springframework.boot.context.env; +package org.springframework.boot.context.config; import java.util.ArrayList; import java.util.List; import org.springframework.beans.BeanUtils; -import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.context.ApplicationContextException; import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; diff --git a/spring-boot/src/main/java/org/springframework/boot/config/RandomValuePropertySource.java b/spring-boot/src/main/java/org/springframework/boot/context/config/RandomValuePropertySource.java similarity index 97% rename from spring-boot/src/main/java/org/springframework/boot/config/RandomValuePropertySource.java rename to spring-boot/src/main/java/org/springframework/boot/context/config/RandomValuePropertySource.java index 7a33b023c4..1bc92de4b2 100644 --- a/spring-boot/src/main/java/org/springframework/boot/config/RandomValuePropertySource.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/config/RandomValuePropertySource.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.config; +package org.springframework.boot.context.config; import java.util.Random; diff --git a/spring-boot/src/main/java/org/springframework/boot/context/config/package-info.java b/spring-boot/src/main/java/org/springframework/boot/context/config/package-info.java new file mode 100644 index 0000000000..c7558a581b --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/context/config/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * External configuration support allowing 'application.properties' to be loaded + * and used within a Spring Boot application. + * + * @see org.springframework.boot.context.config.ConfigFileApplicationListener + */ +package org.springframework.boot.context.config; + diff --git a/spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/package-info.java b/spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/package-info.java index 251efd5915..5fda9429f3 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/package-info.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/embedded/jetty/package-info.java @@ -16,6 +16,8 @@ /** * Support for Jetty {@link org.springframework.boot.context.embedded.EmbeddedServletContainer EmbeddedServletContainers}. + * + * @see org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainerFactory */ package org.springframework.boot.context.embedded.jetty; diff --git a/spring-boot/src/main/java/org/springframework/boot/context/embedded/package-info.java b/spring-boot/src/main/java/org/springframework/boot/context/embedded/package-info.java index 8c0947a668..0153e6b979 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/embedded/package-info.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/embedded/package-info.java @@ -16,6 +16,7 @@ /** * Support for embedded servlet containers. + * * @see org.springframework.boot.context.embedded.EmbeddedServletContainerFactory * @see org.springframework.boot.context.embedded.EmbeddedWebApplicationContext */ diff --git a/spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/package-info.java b/spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/package-info.java index f650105f13..71e65c0cfb 100644 --- a/spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/package-info.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/package-info.java @@ -16,6 +16,8 @@ /** * Support for Tomcat {@link org.springframework.boot.context.embedded.EmbeddedServletContainer EmbeddedServletContainers}. + * + * @see org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory */ package org.springframework.boot.context.embedded.tomcat; diff --git a/spring-boot/src/main/java/org/springframework/boot/event/ApplicationEnvironmentPreparedEvent.java b/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationEnvironmentPreparedEvent.java similarity index 97% rename from spring-boot/src/main/java/org/springframework/boot/event/ApplicationEnvironmentPreparedEvent.java rename to spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationEnvironmentPreparedEvent.java index b8bddaa9c5..e6d2e14366 100644 --- a/spring-boot/src/main/java/org/springframework/boot/event/ApplicationEnvironmentPreparedEvent.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationEnvironmentPreparedEvent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.event; +package org.springframework.boot.context.event; import org.springframework.boot.SpringApplication; import org.springframework.core.env.ConfigurableEnvironment; diff --git a/spring-boot/src/main/java/org/springframework/boot/event/ApplicationFailedEvent.java b/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationFailedEvent.java similarity index 97% rename from spring-boot/src/main/java/org/springframework/boot/event/ApplicationFailedEvent.java rename to spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationFailedEvent.java index f4d7bab64b..241ff7b23a 100644 --- a/spring-boot/src/main/java/org/springframework/boot/event/ApplicationFailedEvent.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationFailedEvent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.event; +package org.springframework.boot.context.event; import org.springframework.boot.SpringApplication; import org.springframework.context.ConfigurableApplicationContext; diff --git a/spring-boot/src/main/java/org/springframework/boot/event/ApplicationPreparedEvent.java b/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationPreparedEvent.java similarity index 97% rename from spring-boot/src/main/java/org/springframework/boot/event/ApplicationPreparedEvent.java rename to spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationPreparedEvent.java index 934ec66263..5f964540e4 100644 --- a/spring-boot/src/main/java/org/springframework/boot/event/ApplicationPreparedEvent.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationPreparedEvent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.event; +package org.springframework.boot.context.event; import org.springframework.boot.SpringApplication; import org.springframework.context.ApplicationContext; diff --git a/spring-boot/src/main/java/org/springframework/boot/event/ApplicationStartedEvent.java b/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationStartedEvent.java similarity index 97% rename from spring-boot/src/main/java/org/springframework/boot/event/ApplicationStartedEvent.java rename to spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationStartedEvent.java index d226907004..97cfe24446 100644 --- a/spring-boot/src/main/java/org/springframework/boot/event/ApplicationStartedEvent.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/event/ApplicationStartedEvent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.event; +package org.springframework.boot.context.event; import org.springframework.boot.SpringApplication; import org.springframework.context.ApplicationContext; diff --git a/spring-boot/src/main/java/org/springframework/boot/event/EventPublishingRunParticipant.java b/spring-boot/src/main/java/org/springframework/boot/context/event/EventPublishingRunParticipant.java similarity index 98% rename from spring-boot/src/main/java/org/springframework/boot/event/EventPublishingRunParticipant.java rename to spring-boot/src/main/java/org/springframework/boot/context/event/EventPublishingRunParticipant.java index 3d3d0ce21e..8a64ac5b01 100644 --- a/spring-boot/src/main/java/org/springframework/boot/event/EventPublishingRunParticipant.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/event/EventPublishingRunParticipant.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.event; +package org.springframework.boot.context.event; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.boot.SpringApplication; diff --git a/spring-boot/src/main/java/org/springframework/boot/event/SpringApplicationEvent.java b/spring-boot/src/main/java/org/springframework/boot/context/event/SpringApplicationEvent.java similarity index 96% rename from spring-boot/src/main/java/org/springframework/boot/event/SpringApplicationEvent.java rename to spring-boot/src/main/java/org/springframework/boot/context/event/SpringApplicationEvent.java index cc3d96f9b2..f1f710aad6 100644 --- a/spring-boot/src/main/java/org/springframework/boot/event/SpringApplicationEvent.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/event/SpringApplicationEvent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.event; +package org.springframework.boot.context.event; import org.springframework.boot.SpringApplication; import org.springframework.context.ApplicationEvent; diff --git a/spring-boot/src/main/java/org/springframework/boot/context/package-info.java b/spring-boot/src/main/java/org/springframework/boot/context/package-info.java new file mode 100644 index 0000000000..f4ed888f2d --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/context/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Classes related to Spring's {@link org.springframework.context.ApplicationContext}. + */ +package org.springframework.boot.context; + diff --git a/spring-boot/src/main/java/org/springframework/boot/context/properties/package-info.java b/spring-boot/src/main/java/org/springframework/boot/context/properties/package-info.java new file mode 100644 index 0000000000..ac2624de3d --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/context/properties/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Support for external configuration binding via the {@code @ConfigurationProperties} annotation. + * + * @see org.springframework.boot.context.properties.ConfigurationProperties + * @see org.springframework.boot.context.properties.EnableConfigurationProperties + */ +package org.springframework.boot.context.properties; + diff --git a/spring-boot/src/main/java/org/springframework/boot/web/SpringBootServletInitializer.java b/spring-boot/src/main/java/org/springframework/boot/context/web/SpringBootServletInitializer.java similarity index 95% rename from spring-boot/src/main/java/org/springframework/boot/web/SpringBootServletInitializer.java rename to spring-boot/src/main/java/org/springframework/boot/context/web/SpringBootServletInitializer.java index c4c44f709f..ad574752a8 100644 --- a/spring-boot/src/main/java/org/springframework/boot/web/SpringBootServletInitializer.java +++ b/spring-boot/src/main/java/org/springframework/boot/context/web/SpringBootServletInitializer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.web; +package org.springframework.boot.context.web; import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; @@ -22,10 +22,9 @@ import javax.servlet.ServletException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.boot.builder.ParentContextApplicationContextInitializer; import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.context.ParentContextApplicationContextInitializer; import org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext; -import org.springframework.boot.context.web.ServletContextApplicationContextInitializer; import org.springframework.context.ApplicationContext; import org.springframework.web.WebApplicationInitializer; import org.springframework.web.context.ContextLoaderListener; diff --git a/spring-boot/src/main/java/org/springframework/boot/context/web/package-info.java b/spring-boot/src/main/java/org/springframework/boot/context/web/package-info.java new file mode 100644 index 0000000000..62538a892c --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/context/web/package-info.java @@ -0,0 +1,22 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Spring {@link org.springframework.context.ApplicationContext} support relating to web + * deployment. + */ +package org.springframework.boot.context.web; + diff --git a/spring-boot/src/main/java/org/springframework/boot/env/package-info.java b/spring-boot/src/main/java/org/springframework/boot/env/package-info.java new file mode 100644 index 0000000000..c236ffc612 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/env/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Spring {@link org.springframework.core.env.Environment} support. + */ +package org.springframework.boot.env; + diff --git a/spring-boot/src/main/java/org/springframework/boot/json/package-info.java b/spring-boot/src/main/java/org/springframework/boot/json/package-info.java new file mode 100644 index 0000000000..9525df52d3 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/json/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Support for parsing JSON. + * + * @see org.springframework.boot.json.JsonParser + */ +package org.springframework.boot.json; + diff --git a/spring-boot/src/main/java/org/springframework/boot/liquibase/LiquibaseServiceLocatorApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/liquibase/LiquibaseServiceLocatorApplicationListener.java index cd1b6e11ce..4754fdef88 100644 --- a/spring-boot/src/main/java/org/springframework/boot/liquibase/LiquibaseServiceLocatorApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/liquibase/LiquibaseServiceLocatorApplicationListener.java @@ -5,7 +5,7 @@ import liquibase.servicelocator.ServiceLocator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.boot.event.ApplicationStartedEvent; +import org.springframework.boot.context.event.ApplicationStartedEvent; import org.springframework.context.ApplicationListener; import org.springframework.util.ClassUtils; diff --git a/spring-boot/src/main/java/org/springframework/boot/liquibase/package-info.java b/spring-boot/src/main/java/org/springframework/boot/liquibase/package-info.java new file mode 100644 index 0000000000..31ddd6384e --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/liquibase/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Custom support for Liquibase database migration. + * + * @see org.springframework.boot.liquibase.LiquibaseServiceLocatorApplicationListener + */ +package org.springframework.boot.liquibase; + diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/ClasspathLoggingApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/logging/ClasspathLoggingApplicationListener.java index f75c4edcf8..acdba637bd 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/ClasspathLoggingApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/ClasspathLoggingApplicationListener.java @@ -21,8 +21,8 @@ import java.util.Arrays; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.boot.event.ApplicationFailedEvent; -import org.springframework.boot.event.ApplicationStartedEvent; +import org.springframework.boot.context.event.ApplicationFailedEvent; +import org.springframework.boot.context.event.ApplicationStartedEvent; import org.springframework.context.ApplicationEvent; import org.springframework.context.event.SmartApplicationListener; import org.springframework.core.Ordered; diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java index 0ed40e4d5d..f02b384ddc 100644 --- a/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java +++ b/spring-boot/src/main/java/org/springframework/boot/logging/LoggingApplicationListener.java @@ -24,8 +24,8 @@ import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.boot.SpringApplication; -import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; -import org.springframework.boot.event.ApplicationStartedEvent; +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.boot.context.event.ApplicationStartedEvent; import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.event.SmartApplicationListener; diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/java/package-info.java b/spring-boot/src/main/java/org/springframework/boot/logging/java/package-info.java new file mode 100644 index 0000000000..5c3507c88b --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/logging/java/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Support for 'Java Util Logging'. + */ +package org.springframework.boot.logging.java; + diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/log4j/package-info.java b/spring-boot/src/main/java/org/springframework/boot/logging/log4j/package-info.java new file mode 100644 index 0000000000..90e1504f55 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/logging/log4j/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Support for the Log4J logging library. + */ +package org.springframework.boot.logging.log4j; + diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/logback/package-info.java b/spring-boot/src/main/java/org/springframework/boot/logging/logback/package-info.java new file mode 100644 index 0000000000..188e41874a --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/logging/logback/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Support for the Logback logging library. + */ +package org.springframework.boot.logging.logback; + diff --git a/spring-boot/src/main/java/org/springframework/boot/logging/package-info.java b/spring-boot/src/main/java/org/springframework/boot/logging/package-info.java new file mode 100644 index 0000000000..d336d8ec9c --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/logging/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Support and abstractions across several logging libraries. + * + * @see org.springframework.boot.logging.LoggingSystem + */ +package org.springframework.boot.logging; + diff --git a/spring-boot/src/main/java/org/springframework/boot/orm/jpa/package-info.java b/spring-boot/src/main/java/org/springframework/boot/orm/jpa/package-info.java new file mode 100644 index 0000000000..919d00f428 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/orm/jpa/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * JPA Support classes. + */ +package org.springframework.boot.orm.jpa; + diff --git a/spring-boot/src/main/java/org/springframework/boot/package-info.java b/spring-boot/src/main/java/org/springframework/boot/package-info.java new file mode 100644 index 0000000000..6b71811141 --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/package-info.java @@ -0,0 +1,23 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Core Spring Boot classes. + * + * @see org.springframework.boot.SpringApplication + */ +package org.springframework.boot; + diff --git a/spring-boot/src/main/java/org/springframework/boot/yaml/package-info.java b/spring-boot/src/main/java/org/springframework/boot/yaml/package-info.java new file mode 100644 index 0000000000..f59f991b7a --- /dev/null +++ b/spring-boot/src/main/java/org/springframework/boot/yaml/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright 2012-2014 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. + */ + +/** + * Support for parsing YAML. + * + * @see org.springframework.boot.yaml.YamlPropertiesFactoryBean + * @see org.springframework.boot.yaml.YamlMapFactoryBean + */ +package org.springframework.boot.yaml; + diff --git a/spring-boot/src/main/resources/META-INF/spring.factories b/spring-boot/src/main/resources/META-INF/spring.factories index 6477d90210..3e701c877d 100644 --- a/spring-boot/src/main/resources/META-INF/spring.factories +++ b/spring-boot/src/main/resources/META-INF/spring.factories @@ -5,20 +5,20 @@ org.springframework.boot.env.YamlPropertySourceLoader # Run Participants org.springframework.boot.SpringApplicationRunParticipant=\ -org.springframework.boot.event.EventPublishingRunParticipant +org.springframework.boot.context.event.EventPublishingRunParticipant # Application Context Initializers org.springframework.context.ApplicationContextInitializer=\ org.springframework.boot.context.ContextIdApplicationContextInitializer,\ -org.springframework.boot.context.env.EnvironmentDelegateApplicationContextInitializer +org.springframework.boot.context.config.EnvironmentDelegateApplicationContextInitializer # Application Listeners org.springframework.context.ApplicationListener=\ +org.springframework.boot.builder.ParentContextCloserApplicationListener,\ org.springframework.boot.cloudfoundry.VcapApplicationListener,\ -org.springframework.boot.config.ConfigFileApplicationListener,\ org.springframework.boot.context.FileEncodingApplicationListener,\ -org.springframework.boot.context.ParentContextCloserApplicationListener,\ -org.springframework.boot.context.env.EnvironmentDelegateApplicationListener,\ +org.springframework.boot.context.config.ConfigFileApplicationListener,\ +org.springframework.boot.context.config.EnvironmentDelegateApplicationListener,\ org.springframework.boot.liquibase.LiquibaseServiceLocatorApplicationListener,\ org.springframework.boot.logging.ClasspathLoggingApplicationListener,\ org.springframework.boot.logging.LoggingApplicationListener diff --git a/spring-boot/src/test/java/org/springframework/boot/cloudfoundry/VcapApplicationListenerTests.java b/spring-boot/src/test/java/org/springframework/boot/cloudfoundry/VcapApplicationListenerTests.java index 79836c06fc..070adb892f 100644 --- a/spring-boot/src/test/java/org/springframework/boot/cloudfoundry/VcapApplicationListenerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/cloudfoundry/VcapApplicationListenerTests.java @@ -18,7 +18,7 @@ package org.springframework.boot.cloudfoundry; import org.junit.Test; import org.springframework.boot.SpringApplication; -import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; diff --git a/spring-boot/src/test/java/org/springframework/boot/context/FileEncodingApplicationListenerTests.java b/spring-boot/src/test/java/org/springframework/boot/context/FileEncodingApplicationListenerTests.java index 6636bc6387..718a7973f4 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/FileEncodingApplicationListenerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/FileEncodingApplicationListenerTests.java @@ -19,7 +19,7 @@ package org.springframework.boot.context; import org.junit.Assume; import org.junit.Test; import org.springframework.boot.SpringApplication; -import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.StandardEnvironment; diff --git a/spring-boot/src/test/java/org/springframework/boot/config/ConfigFileApplicationListenerTests.java b/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java similarity index 98% rename from spring-boot/src/test/java/org/springframework/boot/config/ConfigFileApplicationListenerTests.java rename to spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java index 67adbd5df6..5d7f904c1c 100644 --- a/spring-boot/src/test/java/org/springframework/boot/config/ConfigFileApplicationListenerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/config/ConfigFileApplicationListenerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.boot.config; +package org.springframework.boot.context.config; import java.util.Arrays; @@ -26,8 +26,9 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.springframework.boot.SpringApplication; -import org.springframework.boot.config.ConfigFileApplicationListener.ConfigurationPropertySources; -import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.boot.context.config.ConfigFileApplicationListener; +import org.springframework.boot.context.config.ConfigFileApplicationListener.ConfigurationPropertySources; +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Configuration; diff --git a/spring-boot/src/test/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationContextInitializerTests.java b/spring-boot/src/test/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationContextInitializerTests.java similarity index 96% rename from spring-boot/src/test/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationContextInitializerTests.java rename to spring-boot/src/test/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationContextInitializerTests.java index 626de2bd52..2d24cba92c 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationContextInitializerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationContextInitializerTests.java @@ -14,11 +14,12 @@ * limitations under the License. */ -package org.springframework.boot.context.env; +package org.springframework.boot.context.config; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.springframework.boot.context.config.EnvironmentDelegateApplicationContextInitializer; import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.context.ApplicationContextException; import org.springframework.context.ApplicationContextInitializer; diff --git a/spring-boot/src/test/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationListenerTests.java b/spring-boot/src/test/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationListenerTests.java similarity index 94% rename from spring-boot/src/test/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationListenerTests.java rename to spring-boot/src/test/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationListenerTests.java index 1f9c1d355a..dd5c4f46a2 100644 --- a/spring-boot/src/test/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationListenerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/context/config/EnvironmentDelegateApplicationListenerTests.java @@ -14,14 +14,15 @@ * limitations under the License. */ -package org.springframework.boot.context.env; +package org.springframework.boot.context.config; import org.junit.After; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.springframework.boot.SpringApplication; -import org.springframework.boot.event.ApplicationEnvironmentPreparedEvent; +import org.springframework.boot.context.config.EnvironmentDelegateApplicationListener; +import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent; import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.context.ApplicationListener; import org.springframework.context.ConfigurableApplicationContext; diff --git a/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java b/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java index 89e9aaac35..f00a9c634f 100644 --- a/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java @@ -29,7 +29,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; import org.springframework.boot.SpringApplication; -import org.springframework.boot.event.ApplicationStartedEvent; +import org.springframework.boot.context.event.ApplicationStartedEvent; import org.springframework.boot.logging.java.JavaLoggingSystem; import org.springframework.boot.test.EnvironmentTestUtils; import org.springframework.boot.test.OutputCapture;