Samples cleanup
- Move common properties to samples parent - Avoid explicit `ComponentScan` by moving all the classes to the same package
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<artifactId>spring-cloud-stream-sample-source</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>spring-cloud-stream-sample-source</name>
|
||||
<description>Demo project for Spring XD module</description>
|
||||
<description>Demo project for source module</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
@@ -15,9 +15,7 @@
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<start-class>demo.SourceApplication</start-class>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package source;
|
||||
package demo;
|
||||
|
||||
import static java.lang.annotation.ElementType.*;
|
||||
import static java.lang.annotation.RetentionPolicy.*;
|
||||
@@ -18,12 +18,8 @@ package demo;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
import source.TimeSource;
|
||||
|
||||
@SpringBootApplication
|
||||
@ComponentScan(basePackageClasses=TimeSource.class)
|
||||
public class SourceApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package source;
|
||||
package demo;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
@@ -26,9 +29,6 @@ import org.springframework.integration.annotation.Poller;
|
||||
import org.springframework.integration.core.MessageSource;
|
||||
import org.springframework.messaging.support.GenericMessage;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
* @author Glenn Renfro
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package source;
|
||||
package demo;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.Pattern;
|
||||
Reference in New Issue
Block a user