Skip to content
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

Generated application won't execute in default pacakage #255

Open
RobertOttesen opened this issue Mar 24, 2022 · 3 comments
Open

Generated application won't execute in default pacakage #255

RobertOttesen opened this issue Mar 24, 2022 · 3 comments
Assignees
Labels
bug Something isn't working stale

Comments

@RobertOttesen
Copy link

Describe the bug

If no javaPackage parameter is provided, the Main Application class is generated in the default/root package. Spring Boot will not start the application with the following warning:

** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

How to Reproduce

Generate any main application in the root package.

Expected behavior

Generate the main application in a default package other than the root package. Maybe generate in com.asyncapi.

@RobertOttesen RobertOttesen added the bug Something isn't working label Mar 24, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added stale and removed stale labels Jul 23, 2022
@CameronRushton CameronRushton self-assigned this Nov 1, 2022
@github-actions
Copy link

github-actions bot commented Mar 2, 2023

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Mar 2, 2023
@Mrc0113
Copy link
Contributor

Mrc0113 commented Sep 11, 2023

We should provide a default package of org.asyncapi as the value for javaPackage as if this isn't specified as we don't want Spring trying to do a component scan of the default package to avoid this.

If you use the default package, that means that Spring would have to scan every class loaded into the JVM. That's a lot of classes, most of which have nothing to do with your application. This would increase startup time to a ridiculous level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants