I'm running a server in a docker image openjdk:8-jdk-slim. Inside this server, using spring boot, I receive from the frontend a protobuf file, compile it and add the generated class to the classpath in runtime. I then proceed to use java reflection to get the added class, with the method Class.forName().
Outside of docker, when running in my pc, it works like a charm. However, when I run in docker, it adds the class to the classpath but, when I try to access using the method Class.forName(), with the same class name I use when not in docker, it doesn't find the class. Is there something that I am missing because it is docker?
Aucun commentaire:
Enregistrer un commentaire