{"action":"created","issue":{"url":"https://api.github.com/repos/grails-plugins/grails-spring-security-core/issues/372","labels_url":"https://api.github.com/repos/grails-plugins/grails-spring-security-core/issues/372/labels{/name}","comments_url":"https://api.github.com/repos/grails-plugins/grails-spring-security-core/issues/372/comments","events_url":"https://api.github.com/repos/grails-plugins/grails-spring-security-core/issues/372/events","html_url":"https://github.com/grails-plugins/grails-spring-security-core/issues/372","id":103039355,"number":372,"title":"`springSecurityService` is not injected into domain classes","user":{"login":"damluar","id":3090206,"avatar_url":"https://avatars.githubusercontent.com/u/3090206?v=3","gravatar_id":"","url":"https://api.github.com/users/damluar","html_url":"https://github.com/damluar","followers_url":"https://api.github.com/users/damluar/followers","following_url":"https://api.github.com/users/damluar/following{/other_user}","gists_url":"https://api.github.com/users/damluar/gists{/gist_id}","starred_url":"https://api.github.com/users/damluar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damluar/subscriptions","organizations_url":"https://api.github.com/users/damluar/orgs","repos_url":"https://api.github.com/users/damluar/repos","events_url":"https://api.github.com/users/damluar/events{/privacy}","received_events_url":"https://api.github.com/users/damluar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-25T14:50:38Z","updated_at":"2015-08-26T07:21:11Z","closed_at":"2015-08-25T17:06:43Z","body":"I followed the spring security plugin tutorial for my existing project and created domain classes for user and role as described in tutorial.\r\nBut when the encodePassword() method is called, the `springSecurityService` is `null`\r\n\r\n    protected void encodePassword() {\r\n        password = springSecurityService?.passwordEncoder ? springSecurityService.encodePassword(password) : password\r\n    }\r\n\r\nI looked at the grails output, but everything looks fine:\r\n    \r\n    WARN grails.plugin.springsecurity.SpringSecurityCoreGrailsPlugin - \r\n    Configuring Spring Security Core ...\r\n\r\n    Configuring Spring Security Core ...\r\n    WARN grails.plugin.springsecurity.SpringSecurityCoreGrailsPlugin - ... finished configuring Spring     Security Core\r\n\r\n    ... finished configuring Spring Security Core\r\n\r\nOut of curiosity I created a new empty grails project and as expected `springSecurityService` is injected correctly.\r\nIs there any security plugin log or how could I understand why the service is null?"},"comment":{"url":"https://api.github.com/repos/grails-plugins/grails-spring-security-core/issues/comments/134874332","html_url":"https://github.com/grails-plugins/grails-spring-security-core/issues/372#issuecomment-134874332","issue_url":"https://api.github.com/repos/grails-plugins/grails-spring-security-core/issues/372","id":134874332,"user":{"login":"bdbogjoe","id":1301462,"avatar_url":"https://avatars.githubusercontent.com/u/1301462?v=3","gravatar_id":"","url":"https://api.github.com/users/bdbogjoe","html_url":"https://github.com/bdbogjoe","followers_url":"https://api.github.com/users/bdbogjoe/followers","following_url":"https://api.github.com/users/bdbogjoe/following{/other_user}","gists_url":"https://api.github.com/users/bdbogjoe/gists{/gist_id}","starred_url":"https://api.github.com/users/bdbogjoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdbogjoe/subscriptions","organizations_url":"https://api.github.com/users/bdbogjoe/orgs","repos_url":"https://api.github.com/users/bdbogjoe/repos","events_url":"https://api.github.com/users/bdbogjoe/events{/privacy}","received_events_url":"https://api.github.com/users/bdbogjoe/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T07:21:11Z","updated_at":"2015-08-26T07:21:11Z","body":"Can you explain more what was the issue ?"}}