小编tho*_*sso的帖子

更新Maven项目时出现空参数错误

我正在尝试通过右键单击"Project Explorer"中的项目并选择"Maven" - >"Update"来更新我的multimodule Maven项目.然后我得到了messeage

无法更新项目NAME配置:null参数

在此输入图像描述

其他项目通常会更新,而不会出现错误.在这种情况下我该怎么办?

编辑:我正在使用Eclipse Mars

java null configuration arguments maven

9
推荐指数
2
解决办法
3256
查看次数

Spring-boot oauth2拆分授权服务器和资源服务器

我试图在spring-boot中将资源服务器从授权服务器中分离出来.我有两个不同的应用程序,我分开运行.在授权服务器中,我可以从oauth/token获取承载令牌,但是当我试图访问资源(在头部中发送令牌)时,我收到了无效的令牌错误.我的目的是使用InMemoryTokenStore和承载令牌.谁能告诉我我的代码有什么问题?

授权服务器:

@SpringBootApplication
public class AuthorizationServer extends WebMvcConfigurerAdapter {

  public static void main(String[] args) {
    SpringApplication.run(AuthorizationServer.class, args);
  }

  @Configuration
  @EnableAuthorizationServer
  protected static class OAuth2Config extends AuthorizationServerConfigurerAdapter {

  private TokenStore tokenStore = new InMemoryTokenStore();

  @Autowired
  private AuthenticationManager authenticationManager;

  @Override
  public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
      endpoints
        .authenticationManager(authenticationManager)
        .tokenStore(tokenStore);
  }

  @Override
  public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
      security.checkTokenAccess("hasAuthority('ROLE_USER')");
  }

  @Override
  public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
      clients
          .inMemory()
            .withClient("user")
            .secret("password")
            .authorities("ROLE_USER")
            .authorizedGrantTypes("password")
            .scopes("read", "write")
            .accessTokenValiditySeconds(1800);
  }  
}
Run Code Online (Sandbox Code Playgroud)

资源服务器:

@SpringBootApplication …
Run Code Online (Sandbox Code Playgroud)

java oauth-2.0 spring-boot spring-security-oauth2

6
推荐指数
1
解决办法
9486
查看次数