-
Notifications
You must be signed in to change notification settings - Fork 39
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
fix: Hello world action exposed to the internet in code first archetypes #1920
Conversation
@@ -24,7 +24,7 @@ | |||
<dockerImage>${D}{kalixContainerRegistry}/${D}{kalixOrganization}/${D}{project.artifactId}</dockerImage> | |||
<dockerTag>${project.version}-${build.timestamp}</dockerTag> | |||
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format> | |||
<mainClass>${package}.Main</mainClass> | |||
<mainClass>${package}.MainKt</mainClass> |
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.
I'm not a Kotling expert, but without this, the mvn kalix:runAll
command doesn't work.
@RequestMapping | ||
/** | ||
* This is a simple Action that returns "Hello World!" and it's exposed to the Internet. | ||
* Locally, you can access it by running `curl http://localhost:9000/hello`. | ||
*/ |
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.
Is it intentional to have the annotation before the class comment?
Look non-standard to me.
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.
yeah, I saw the same in the main class:
@SpringBootApplication
// Allow all other Kalix services deployed in the same project to access the components of this
// Kalix service, but disallow access from the internet. This can be overridden explicitly
// per component or method using annotations.
// Documentation at https://docs.kalix.io/services/using-acls.html
@Acl(allow = @Acl.Matcher(service = "*"))
public class Main {
private static final Logger logger = LoggerFactory.getLogger(Main.class);
public static void main(String[] args) {
logger.info("Starting Kalix Application");
SpringApplication.run(Main.class, args);
}
}
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 different.
The following is a javadoc.
/**
*
*/
While the comment in the Main.class is a comment about the Acl
annotation that is just under it.
maven-java/kalix-spring-boot-kotlin-archetype/src/main/resources/archetype-resources/pom.xml
Show resolved
Hide resolved
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.
LGTM.
No description provided.