Petite and Documentation

16 views
Skip to first unread message

BloodySmartie

unread,
Dec 16, 2013, 7:51:49 AM12/16/13
to jod...@googlegroups.com
Hi there,

as i'm a happy Jodd user so far, i wanted to start experimenting with things that i haven't had my hands on, so far. So i took a look at Petite. 
The docs show the following example code:
PetiteContainer petite = new PetiteContainer();
   
// same as: petite.registerBean("foo", Foo.class);
    petite
.registerBean(Foo.class);
    petite
.registerBean(Boo.class);

I was already hit in the face by this little snippet, because there doesn't seem to be a "registerBean" method for PetiteContainer. There is "addBean" and "registerPetiteBean" but the signatures of these methods look different than what the documentation shows.

I'm using Jodd 3.4.9 - maybe things changed so that the Docs don't apply to thisversion anymore. If this is true, is there a little Hello World-Example that i could take a look at?

Best regards,

David

Jodders

unread,
Dec 16, 2013, 8:32:41 AM12/16/13
to jod...@googlegroups.com
Sure, I will update docs today and let you know!

BloodySmartie

unread,
Dec 16, 2013, 9:24:00 AM12/16/13
to jod...@googlegroups.com
Thanks a lot :)

Jodders

unread,
Dec 16, 2013, 9:57:39 AM12/16/13
to jod...@googlegroups.com
Ive updated documentation:


In short, there is one PetiteContainer method for registration: registerPetiteBean but you need to provide everything. There is user friendly way to manually register beans: PetiteRegistry Finally, there is 'automagic' way to register beans - where your class path is scanned and all annotated beans get registered.

Just keep reading :) Also, if you notice some more errors, feel free to ping me ;) One tip: look at the test sources, they are always up-to-date with current syntax, if for some reason I am not responding in timely manner!

I hope this helps! Thanks for trying Jodd!

Enjoy!


On Monday, December 16, 2013 3:24:00 PM UTC+1, BloodySmartie wrote:
Thanks a lot :)
Reply all
Reply to author
Forward
0 new messages