It all works perfectly, but my real goal is to build a bookshop application, so I have to substitute class Product for class Book (& all related names like 'product' -> 'book').
I've done the substitution just by:
1. Find/Replace (with Case sensitive off course): 'Product' -> 'Book', 'product' -> 'book', 'PRODUCT' -> 'BOOK'
2. changing file names appropriately
3. Change some names of Book attribute like Product.id' -> 'Book.isbn'
and that's all. The project compiles without errors, builds & deploys with Ant build.xml script. But when I restart Tomcat, the exception occurs:
"Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'bookManager' of bean class [web.InventoryController]: Bean property 'bookManager' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?"
Of course I've checked & everything is OK with bookManager - it has correct setter etc.
If any of You had this problem or knows the solution or has some time to check these 2 projects, I would be greatful.
Ok, I've done the tutorial once again but this time straightly with Book class from the very beginning ;) I think the problem was that the bean 'productManager' was still somewhere deployed in Tomcat, instead of the 'bookManager' bean. Thanks for help! ;P