|
提示: 作者被禁止或删除, 无法发言
My opion is , when you repeating the same logic again and again, probably you need to refactor your code.
In our case, if you have to give every BO method a similar annotation just for transaction, probably you should use simple common xml configuration insteadly. And that seperates the database dependency out of your BO.
And the reason to use annotation in entity beans is you may need to do some special settings for some fields. And it makes sense because the entity bean is database realated in real life. Same as in controller class, every annotation you write should be unique and maintance some unique information
The right choice is always basing on the facts.
[ 本帖最后由 black_zerg 于 8-2-2009 20:45 编辑 ] |
|