{"action":"created","issue":{"url":"https://api.github.com/repos/onlyliuxin/coding2017/issues/328","repository_url":"https://api.github.com/repos/onlyliuxin/coding2017","labels_url":"https://api.github.com/repos/onlyliuxin/coding2017/issues/328/labels{/name}","comments_url":"https://api.github.com/repos/onlyliuxin/coding2017/issues/328/comments","events_url":"https://api.github.com/repos/onlyliuxin/coding2017/issues/328/events","html_url":"https://github.com/onlyliuxin/coding2017/issues/328","id":235743050,"number":328,"title":"JavaBean 是如何用的？","user":{"login":"ChristopherYue","id":18697640,"avatar_url":"https://avatars0.githubusercontent.com/u/18697640?v=3","gravatar_id":"","url":"https://api.github.com/users/ChristopherYue","html_url":"https://github.com/ChristopherYue","followers_url":"https://api.github.com/users/ChristopherYue/followers","following_url":"https://api.github.com/users/ChristopherYue/following{/other_user}","gists_url":"https://api.github.com/users/ChristopherYue/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristopherYue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristopherYue/subscriptions","organizations_url":"https://api.github.com/users/ChristopherYue/orgs","repos_url":"https://api.github.com/users/ChristopherYue/repos","events_url":"https://api.github.com/users/ChristopherYue/events{/privacy}","received_events_url":"https://api.github.com/users/ChristopherYue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-06-14T02:13:27Z","updated_at":"2017-06-14T03:12:36Z","closed_at":null,"body":"POJO，VO，BO，PO，各种O...\r\n我目前的情况：\r\n系统场景：每个数据库表对应一个Bean，举例：项目信息表（prjInfo）->项目实体bean（PrjInfoBean）\r\n我的问题：因为这个PrjInfoBean贯穿dao层，service层，action层，然后到jsp去显示一些属性，所以这个PrjInfoBean很冗余，甚至把其他表的字段或属性（比如用户名,订单金额）的属性也加到自己的bean属性中，比如username，orderSum,等，最后发现，原来对应数据库表的一个实体bean，变得很臃肿庞大，甚至还有一些方法比如对于金额的转换也加在bean的方法中。\r\n我的想法：我觉得应该有更好的实现方式，能够不让一个bean如此臃肿，但是一时也想不出如何来做，是通过拆分？还是怎样？\r\n\r\n请大家给出出主意，谢谢！\r\n**刘老师给支个招吧**。\r\n"},"comment":{"url":"https://api.github.com/repos/onlyliuxin/coding2017/issues/comments/308307623","html_url":"https://github.com/onlyliuxin/coding2017/issues/328#issuecomment-308307623","issue_url":"https://api.github.com/repos/onlyliuxin/coding2017/issues/328","id":308307623,"user":{"login":"orajavac","id":25807824,"avatar_url":"https://avatars3.githubusercontent.com/u/25807824?v=3","gravatar_id":"","url":"https://api.github.com/users/orajavac","html_url":"https://github.com/orajavac","followers_url":"https://api.github.com/users/orajavac/followers","following_url":"https://api.github.com/users/orajavac/following{/other_user}","gists_url":"https://api.github.com/users/orajavac/gists{/gist_id}","starred_url":"https://api.github.com/users/orajavac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orajavac/subscriptions","organizations_url":"https://api.github.com/users/orajavac/orgs","repos_url":"https://api.github.com/users/orajavac/repos","events_url":"https://api.github.com/users/orajavac/events{/privacy}","received_events_url":"https://api.github.com/users/orajavac/received_events","type":"User","site_admin":false},"created_at":"2017-06-14T03:12:36Z","updated_at":"2017-06-14T03:12:36Z","body":"从你描述来说，需要从数据库表设计入手"}}
{"actor":{"display_login":"orajavac"}}