Reformat code use Eclipse Mars
This commit is contained in:
@@ -27,8 +27,8 @@ import org.springframework.context.annotation.ImportResource;
|
||||
public class SampleParentContextApplication {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
new SpringApplicationBuilder(Parent.class).child(
|
||||
SampleParentContextApplication.class).run(args);
|
||||
new SpringApplicationBuilder(Parent.class)
|
||||
.child(SampleParentContextApplication.class).run(args);
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration
|
||||
|
||||
@@ -86,15 +86,16 @@ public class SampleIntegrationParentApplicationTests {
|
||||
}
|
||||
|
||||
private Resource[] findResources() throws IOException {
|
||||
return ResourcePatternUtils.getResourcePatternResolver(
|
||||
new DefaultResourceLoader()).getResources("file:target/output/**/*.msg");
|
||||
return ResourcePatternUtils
|
||||
.getResourcePatternResolver(new DefaultResourceLoader())
|
||||
.getResources("file:target/output/**/*.msg");
|
||||
}
|
||||
|
||||
private String readResources(Resource[] resources) throws IOException {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (Resource resource : resources) {
|
||||
builder.append(new String(StreamUtils.copyToByteArray(resource
|
||||
.getInputStream())));
|
||||
builder.append(
|
||||
new String(StreamUtils.copyToByteArray(resource.getInputStream())));
|
||||
}
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@ public class ProducerApplication implements CommandLineRunner {
|
||||
public void run(String... args) throws Exception {
|
||||
new File("target/input").mkdirs();
|
||||
if (args.length > 0) {
|
||||
FileOutputStream stream = new FileOutputStream("target/input/data"
|
||||
+ System.currentTimeMillis() + ".txt");
|
||||
FileOutputStream stream = new FileOutputStream(
|
||||
"target/input/data" + System.currentTimeMillis() + ".txt");
|
||||
for (String arg : args) {
|
||||
stream.write(arg.getBytes());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user