• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

DI - Beginners Question

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic