Author | Message |
---|---|
aligh1979
Posts: 121
|
Posted 01:44 Oct 28, 2011 |
in slides (as professor mentioned at class ) these are named as beans : @Component , @Repository , @Controller , @Service in course example , the command object (ModelAttribute) interacts with course -the constructor of the course object does not even set the name- so Entity should act like a bean . right? |
cysun
Posts: 2935
|
Posted 08:16 Oct 28, 2011 |
No, @Entity does not annotate a Spring bean - it's for ORM mapping. In the course management example, the controllers (i.e. not the framework) create the command objects, the user enter the values for fields like code and name, and the framework set the values to the properties of the command object. |