{"action":"created","issue":{"url":"https://api.github.com/repos/oblac/jodd/issues/625","repository_url":"https://api.github.com/repos/oblac/jodd","labels_url":"https://api.github.com/repos/oblac/jodd/issues/625/labels{/name}","comments_url":"https://api.github.com/repos/oblac/jodd/issues/625/comments","events_url":"https://api.github.com/repos/oblac/jodd/issues/625/events","html_url":"https://github.com/oblac/jodd/issues/625","id":346477010,"node_id":"MDU6SXNzdWUzNDY0NzcwMTA=","number":625,"title":"Cannot inject private field value on bean class","user":{"login":"yujinping","id":2682073,"node_id":"MDQ6VXNlcjI2ODIwNzM=","avatar_url":"https://avatars0.githubusercontent.com/u/2682073?v=4","gravatar_id":"","url":"https://api.github.com/users/yujinping","html_url":"https://github.com/yujinping","followers_url":"https://api.github.com/users/yujinping/followers","following_url":"https://api.github.com/users/yujinping/following{/other_user}","gists_url":"https://api.github.com/users/yujinping/gists{/gist_id}","starred_url":"https://api.github.com/users/yujinping/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujinping/subscriptions","organizations_url":"https://api.github.com/users/yujinping/orgs","repos_url":"https://api.github.com/users/yujinping/repos","events_url":"https://api.github.com/users/yujinping/events{/privacy}","received_events_url":"https://api.github.com/users/yujinping/received_events","type":"User","site_admin":false},"labels":[{"id":13442734,"node_id":"MDU6TGFiZWwxMzQ0MjczNA==","url":"https://api.github.com/repos/oblac/jodd/labels/enhancement","name":"enhancement","color":"0e8a16","default":true},{"id":462745536,"node_id":"MDU6TGFiZWw0NjI3NDU1MzY=","url":"https://api.github.com/repos/oblac/jodd/labels/jodd-petite","name":"jodd-petite","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":{"login":"igr","id":2280001,"node_id":"MDQ6VXNlcjIyODAwMDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2280001?v=4","gravatar_id":"","url":"https://api.github.com/users/igr","html_url":"https://github.com/igr","followers_url":"https://api.github.com/users/igr/followers","following_url":"https://api.github.com/users/igr/following{/other_user}","gists_url":"https://api.github.com/users/igr/gists{/gist_id}","starred_url":"https://api.github.com/users/igr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igr/subscriptions","organizations_url":"https://api.github.com/users/igr/orgs","repos_url":"https://api.github.com/users/igr/repos","events_url":"https://api.github.com/users/igr/events{/privacy}","received_events_url":"https://api.github.com/users/igr/received_events","type":"User","site_admin":false},"assignees":[{"login":"igr","id":2280001,"node_id":"MDQ6VXNlcjIyODAwMDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2280001?v=4","gravatar_id":"","url":"https://api.github.com/users/igr","html_url":"https://github.com/igr","followers_url":"https://api.github.com/users/igr/followers","following_url":"https://api.github.com/users/igr/following{/other_user}","gists_url":"https://api.github.com/users/igr/gists{/gist_id}","starred_url":"https://api.github.com/users/igr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igr/subscriptions","organizations_url":"https://api.github.com/users/igr/orgs","repos_url":"https://api.github.com/users/igr/repos","events_url":"https://api.github.com/users/igr/events{/privacy}","received_events_url":"https://api.github.com/users/igr/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-08-01T07:17:44Z","updated_at":"2018-08-13T15:58:07Z","closed_at":"2018-08-13T15:57:49Z","author_association":"NONE","body":"PetiteInject cannot inject private field on bean class.\r\nFor example:\r\n```\r\n@PetiteBean\r\npublic class BaseDao<T> {\r\n}\r\n```\r\n```\r\n@PetiteBean\r\npublic class BaseService<T> {\r\n    @PetiteInject\r\n    private BaseDao<T> dao;\r\n}\r\n```\r\nIn the class BaseService, when use private before \"dao\" field, the \"dao\" field value will be null.\r\nAfter remove \"private\" ,\"dao\" will be injected well.\r\n\r\nBut ,there is some difference on madvoc action.\r\n ```\r\n@MadvocAction\r\npublic class IndexAction {\r\n    @PetiteInject\r\n    private UserService userService=null;\r\n\r\n    @In\r\n    private Integer index=null;\r\n\r\n    @RestAction(\"/\")\r\n    public List<User> index(){\r\n        List<User> users = userService.list(User.class);\r\n\r\n        if(index!=null)\r\n            throw new ServiceException(3,\"ERROR\");\r\n        return users;\r\n    }\r\n}\r\n```\r\nIn the IndexAction, field \"userService\" and \"index\" have  private access , but the value be injected all well here .\r\n\r\nShould we have the same principle for all injection ? Just like spring framework, check the annotation on the private field ,not only on the current java class, but also the super class(Until the current class is Object)?"},"comment":{"url":"https://api.github.com/repos/oblac/jodd/issues/comments/412568866","html_url":"https://github.com/oblac/jodd/issues/625#issuecomment-412568866","issue_url":"https://api.github.com/repos/oblac/jodd/issues/625","id":412568866,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjU2ODg2Ng==","user":{"login":"igr","id":2280001,"node_id":"MDQ6VXNlcjIyODAwMDE=","avatar_url":"https://avatars3.githubusercontent.com/u/2280001?v=4","gravatar_id":"","url":"https://api.github.com/users/igr","html_url":"https://github.com/igr","followers_url":"https://api.github.com/users/igr/followers","following_url":"https://api.github.com/users/igr/following{/other_user}","gists_url":"https://api.github.com/users/igr/gists{/gist_id}","starred_url":"https://api.github.com/users/igr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igr/subscriptions","organizations_url":"https://api.github.com/users/igr/orgs","repos_url":"https://api.github.com/users/igr/repos","events_url":"https://api.github.com/users/igr/events{/privacy}","received_events_url":"https://api.github.com/users/igr/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T15:58:07Z","updated_at":"2018-08-13T15:58:07Z","author_association":"MEMBER","body":"Thank you, you were right!"}}
{"actor":{"display_login":"igr"}}