不要使用多个
inMemory构建器,而是将多个
withClients 连接在一个内部
inMemory:
@Overridepublic void configure(ClientDetailsServiceConfigurer clients) throws Exception { clients.inMemory() .withClient("first") .secret("secret") .scopes("read") .authorizedGrantTypes("password") .and() .withClient("sec") .secret("secret") .scopes("read") .authorizedGrantTypes("password");}


