Relative Content

Tag Archive for javaspring-boot

How to access current active profile in a static method?

I have a utility class with a bunch of static methods for updating certificates in the truststore. Within the static method I need to know the name of the current active profile. Since it’s static I can’t pass the value from @Value("${spring.profiles.active:}"). Is there a better way to do this?

how to access the path which images uploaded?

I have a spring boot project ,I package it into a jar file. I upload this jar to server,but when visit my website, i can’t visit pictures which uploaded to the server.
enter image description here
i put my pictures in this path and jar in this pathenter image description here
my code fragment
enter image description here
enter image description here

Connecting vcenter using yavi java in springboot

I am trying to connect vcenter via spring boot, when i fill the details in serviceInstance like url, username , password, ignorecert is true/ false it is not connecting with vcenter null pointer exception is coming can you guys help me out.