Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthorizationServerConfig 编译不过 #6

Open
junneyang opened this issue Sep 13, 2017 · 5 comments
Open

AuthorizationServerConfig 编译不过 #6

junneyang opened this issue Sep 13, 2017 · 5 comments

Comments

@junneyang
Copy link

@Override
    public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
        endpoints
                .authenticationManager(authenticationManager)
                .userDetailsService(userDetailsService)//若无,refresh_token会有UserDetailsService is required错误
                .tokenStore(tokenStore());
    }

userDetailsService 在哪儿定义的呢

@ccfish86
Copy link

这个直接加一个对象进去,应该可以,另外还有一些model没有生成get/set方法

    @Autowired
    private UserDetailsService userDetailsService;

@soonboylena
Copy link

@ccfish86 get set方法没有是因为你的IDE不支持Lombok。 @DaTa注解没有起效

@MrLinXD
Copy link

MrLinXD commented Feb 7, 2018

@ccfish86 @soonboylena 我有个疑问,为什么
//@Service("userDetailsService")
这句都注释掉了,为啥

    @Autowired
    private UserDetailsService userDetailsService;

还生效能注入呢?

@ccfish86
Copy link

ccfish86 commented Feb 7, 2018

@MrLinXD
SecurityConfig.java里有对应的

    @Bean
    public UserDetailsService userDetailsService(){
        return new DomainUserDetailsService();
    }

@MrLinXD
Copy link

MrLinXD commented Feb 7, 2018

噢噢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants