Initalization of Class properties by Spring

I need to initialize a property of a class , which contains a path to a folder.

I used this property within the default constructor of the class.

it seems that Spring does not initialize this property before it executes the constructor, thus i get a crash with NullPointerException.

 

Alternatively i need to get a relative path to that Sprin bean, which runs under Tomcat. Had this been a Servlet, there would be no problem to get relative path. But how do i achieve same result with Spring ?

 

Thank you for your interest!

We will contact you as soon as possible.

Want to Know More?

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com
Thank you for your interest!

We will contact you as soon as possible.

Let's talk

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com