By the time you package a Spring service with some usually required needs (logging, jpa, monitoring, security, messaging, etc.) the final jar file can be quite large. Every dependency needs to be pulled in regardless of whether it is actually used in the runtime app or not.
New frameworks like Micronaut and Quarkus are trying to prepare Java for the new world of Serverless & Containers.
See more details at [https://blogs.justenougharchitecture.com/say-hello-to-micronaut-inside-kubernetes-with-prometheus-grafana/]