Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Introduce native applications guidelines for Spring contributors #256

Closed
sdeleuze opened this issue Aug 30, 2020 · 3 comments
Closed

Introduce native applications guidelines for Spring contributors #256

sdeleuze opened this issue Aug 30, 2020 · 3 comments
Assignees
Labels
type: documentation A documentation task
Milestone

Comments

@sdeleuze
Copy link
Contributor

sdeleuze commented Aug 30, 2020

  • proxyBeanMethods=false on configurations to avoid CGLIB proxies
  • Favor using functional constructs rather than reflection: method references and lamdas when possible instead of reflection like in Spring Boot LoggingSystem.
  • Build time initialization + static initialization when optional libraries are used to allow automatic build time code removal
  • Move reflection from runtime to build-time
  • etc.
@sdeleuze sdeleuze added the type: documentation A documentation task label Aug 30, 2020
@sdeleuze sdeleuze added this to the v0.8.1 milestone Aug 30, 2020
@sdeleuze sdeleuze self-assigned this Aug 30, 2020
@sdeleuze sdeleuze changed the title Introduce native guidelines for Spring contributors Introduce native applications guidelines for Spring contributors Sep 7, 2020
@sdeleuze sdeleuze modified the milestones: v0.8.1, v0.8.2 Sep 21, 2020
@sdeleuze sdeleuze modified the milestones: v0.8.2, v0.9.0 Oct 19, 2020
@grekier
Copy link
Contributor

grekier commented Feb 10, 2021

Might I suggest a note that the UID and GID running the application are different after building container as native compared to non native container.
Not relevant in many cases but took me some time to figure that one out when needed.

I also noted that kotlin data classes seems to fail if they are used as DTOs and have not a default set for all var in the constructor also same kind of issue if java classes are using lombok (com.fasterxml.jackson.databind.exc.InvalidDefinitionException).
Also some errors I haven't noted with @Entity/@document classes combined with lombok.
Not sure if these are because of bad configuration on my side but thought I mentioned it.

@sdeleuze
Copy link
Contributor Author

@ekcasey Could you please comment on the UID/GID point raised above?

@grekier The Kotlin reflection issue should be fixed via KT-44594, see #419 related issue.

@sdeleuze
Copy link
Contributor Author

TODO: mention it is possible to debug spring-aot-maven-plugin with mvnDebug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: documentation A documentation task
Development

No branches or pull requests

2 participants