Skip to content

Developing Your First Spring Boot Application section asks the user to create the application in the root package #43964

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

Closed
zouchengzhuo opened this issue Jan 26, 2025 · 7 comments
Labels
status: superseded An issue that has been superseded by another type: documentation A documentation update

Comments

@zouchengzhuo
Copy link

zouchengzhuo commented Jan 26, 2025

https://github.com/spring-projects/spring-boot/blob/v3.4.2/spring-boot-project/spring-boot-docs/src/docs/antora/modules/tutorial/pages/first-application/index.adoc

run a simple demo project step by step with the doc below, a error occur:

java.lang.ClassNotFoundException:org.springframework.dao.DataAccessException

The #1839 tell me that should not put main method in the default package. maybe we should update the doc?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 26, 2025
@snicoll snicoll added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 26, 2025
@snicoll snicoll added this to the 3.3.x milestone Jan 26, 2025
@snicoll
Copy link
Member

snicoll commented Jan 26, 2025

Thanks for the report. Two things are going on here

  1. We were supposed to have a com.example package but it looks like it's gone in recent versions. Perhaps a regression of the move to Antora?
  2. In all cases we instruct the users to create a source file in src/main/java/MyApplication.java which is wrong given the package statement.

@snicoll snicoll changed the title java.lang.ClassNotFoundException:org.springframework.dao.DataAccessException Developing Your First Spring Boot Application section asks the user to create the application in the root package Jan 26, 2025
@bclozel
Copy link
Member

bclozel commented Jan 26, 2025

This rings a bell indeed.

#34513

@mhalbritter
Copy link
Contributor

Point 2 from @snicoll's comment is resolved by #43965.

@wilkinsona
Copy link
Member

For point 1 above, there are a couple of problems:

  • A block-level chomp_package_replacement attribute is ignored
  • include-code does not transfer the chomp_package_replacement attribute to the blocks that it creates.

Both of these will have to be addressed in https://github.com/spring-io/asciidoctor-extensions. I'm working on that now.

@wilkinsona wilkinsona added the status: blocked An issue that's blocked on an external project change label Jan 27, 2025
@philwebb
Copy link
Member

#43982 should have unblocked this issue

@philwebb philwebb removed the status: blocked An issue that's blocked on an external project change label Jan 28, 2025
@wilkinsona
Copy link
Member

2fe9de5 has taken care of this as it's only the upgrade that was needed.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2025
@wilkinsona wilkinsona removed this from the 3.3.x milestone Jan 28, 2025
@wilkinsona wilkinsona added the status: superseded An issue that has been superseded by another label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

7 participants