I'm working with Spring and I want to initiate my service (model) with dependecy injection. My service expects a Propertie object, containing the url, user, password,ssl,sslfactory parameters for the database. I was wondring if this could still be done using dependency injection.
So my constructor looks like this: Service(Properties propertie)
Inside my controller I've got a private field service:
@Autowired
private Service service;
And now I want to inject the right properties in it.
<bean id="service" class="service.Service">
<constructor-arg >
<value>?</value>
</constructor-arg>
</bean>
I don't know if it can be done, can anyone help me? Thanks in advance.