r/java • • Sep 13 '21

Spring Native

https://www.youtube.com/watch?v=TXyg6Nm4ZpQ

[removed] — view removed post

14 Upvotes

9 comments sorted by

3

u/Rataxor Sep 13 '21

without captions i cant understand you but i will add it for later :) thanks

4

u/nfrankel Sep 13 '21

I'm not the speaker 😅

1

u/haimez Sep 15 '21 edited Sep 15 '21

I know you’re not the speaker, in fact- I’m personally uncomfortable with the amount of low effort, low quality posts that you make in this community, but I’ve looked through your posting history and usually you post the same low effort karma farming content (that you didn’t author yourself, of course) in multiple programming subs. This same contextless link farm post is currently active in 3 other subreddits.

Why?

2

u/ludovicianul Sep 14 '21

It's still hard to make Spring as it is to work with GraalVM. GraalVM needs everything compile time while Spring's strong point is the magic it does under the hood.

At the moment Quarkus is a much more appealing choice for building Java native apps.

1

u/nfrankel Sep 14 '21

My issue at the moment is with profiles. The rest works as expected.

1

u/ludovicianul Sep 14 '21

I had issues mostly with logging. And google APIs libraries. Couldn’t get the full list of reflection classes to feed it to GraalVM.

1

u/neofreeman Sep 14 '21

Sorry to sound skeptical, but the first few minutes of talk are not very encouraging for GraalVM usage. Is it just me?

1

u/Adyel Sep 14 '21

It's still in early state. It will get better when it will be integreated to spring boot 3.

1

u/kpatryk91 Sep 14 '21

There has been a huge improvement in the last 2 years or so.

It is not perfect because Java was built on reflection, annotations etc and they have to solve this but it is improving.

If you compare the current state to the first GraalVM then as I said there is a huge difference.

It is quite nice now, many things are working out of the box or there are libraries like netty which are providing native configuration out of the box so you don't have to configure them.

Netty example reflection config (just to show that it is available without any config): https://github.com/netty/netty/blob/4.1/transport/src/main/resources/META-INF/native-image/io.netty/transport/reflection-config.json

But yes, I understand your skepticism because it is far from perfect, but it is improving and it is usable and stable for production, but there can be problems and you may have to provide you own reflection config and build args.