-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic Annotations Helloworld #221
base: main
Are you sure you want to change the base?
Conversation
@lunkdjedi Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@lunkdjedi Thank you for signing the Contributor License Agreement! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, consider to move this project to the dsl
directory.
Also you need really to add a Gladle project to the build.gradle
Anyway thank you very much for the contribution!
|
||
@Configuration | ||
@EnableIntegration | ||
@IntegrationComponentScan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this annotation. There is no any @MessagingGateway
in your application
|
||
@Bean | ||
public IntegrationFlow helloFlow(final HelloService helloService) { | ||
return IntegrationFlows.from(inputChannel()).handle(new GenericHandler<String>() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, consider to use method chain style, when each call is on its own line starting with period.
Also, consider to use lambda instead of the GenericHandler
.
@@ -0,0 +1,33 @@ | |||
/* | |||
* Copyright 2002-2012 the original author or authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a new class, so only the current year in the Copyright.
All classes must have the Copyright, BTW.
/** | ||
* Simple POJO to be referenced from a Service Activator. | ||
* | ||
* @author Mark Fisher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is your class, not Mark's.
As well as for all other your classes, please.
*/ | ||
@SuppressWarnings("resource") | ||
public static void main(String[] args) throws Exception{ | ||
new AnnotationConfigApplicationContext(PollerConfig.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it is pollable app we really can't just use context.close();
in the end.
So, consider to include to the code this:
System.in.read();
context.close();
* demonstrated below. | ||
* <p> | ||
* View the configuration of the channels and the endpoint (a <service-activator/> | ||
* element) in 'helloWorldDemo.xml' within this same package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is somehow not related to the current state of the code.
I mean you claim like it is about annotations and DSL configuration, but still point to the XML config in JavaDocs
Refactored the helloworld integration-samples to be completely annotation based.