Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DI - Beginners Question

 
Javier Montagna
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, first of all sorry if this question was answer elsewhere I looked for it and found some similar examples but when I try to implement the solution (Found in this kind of post) I get an error message.

I am trying to use a really simple DI example, the configuration file does a few thing but the part that is causing problems is the following (I will erase everything but the part that is causing problems to keep it simple):

1)

2)

3)

The line in red is causing the following error:

I am trying to do this simple DI but is not finding the properties but I honestly don't know why, if someone could give me a hand i would be much appreciated.

Thanks in advanced and sorry for the nob question
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try with lower-case property names, which would be the conventional, and correct approach?

It's also typical to name Java instance variables and Spring beans starting with a lower-case letter.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with David. You have to do something about your naming convention. This not only looks awful, but it's also prone to errors. Check this document. These are only guidelines, but worth to follow.
 
Javier Montagna
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the Input, I follow the Convention display in the web site but the problem persists

Thank you for the replies.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the current configuration and code? Also try adding a getter (so it's a "real" property).
 
Javier Montagna
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:Can you post the current configuration and code? Also try adding a getter (so it's a "real" property).


I stand corrected :P ... I was missing an uppercase jeje, double check, fix the naming and now it works

Thanks again for the help :)

Have a great day
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic