How to get Docker static Image layer from one project and reuse them in another Spring Boot project

I have a Docker image of Spring boot application as base image. I want to reuse classes of base image in another Spring Boot project and rebuild image. Can anyone help me?

Sure, I googled it for you using the keywords “spring boot docker layers” and the first result is from, which usualy is a good ressource for spring boot topics:

This ressource allows me to separate into layers but I want to reuse these layers in my another project and build image.
Please help me !