You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
Compilation fails due to references to package protected classes from target/generated-sources/spring-aot/src/main/java/org/springframework/aot/ContextBootstrapInitializer.java:
The references to Engine and OrderInitializer cause the compile errors, as they're package protected. Making them public as a workaround works.
Expected outcome
The generated code compiles successfully.
Other observations
I see the actual instance creation code generated into the application package for the package protected classes, too. So it seems that it's the event listener related, generated code that does not yet honor the package protection.
The text was updated successfully, but these errors were encountered:
Event listener registration doesn't support package private event listeners indeed. This is something that was on my TODO list. Thanks for raising the issue.
snicoll
changed the title
AOT code generation generates code that tries to refer to package protected code from a framework package
EventListener registration does not work with package private annotated types
Sep 28, 2021
Steps to reproduce
$ git clone https://github.com/odrotbohm/spring-restbucks $ cd spring-restbucks $ git checkout hacking/aot $ ./mvnw verify -DskipTests
Outcome
Compilation fails due to references to package protected classes from
target/generated-sources/spring-aot/src/main/java/org/springframework/aot/ContextBootstrapInitializer.java
:The references to
Engine
andOrderInitializer
cause the compile errors, as they're package protected. Making thempublic
as a workaround works.Expected outcome
The generated code compiles successfully.
Other observations
I see the actual instance creation code generated into the application package for the package protected classes, too. So it seems that it's the event listener related, generated code that does not yet honor the package protection.
The text was updated successfully, but these errors were encountered: