2017-01-29 135 views

答えて

0

同じポートで2つのプロセスを実行することはできません。だから、そのうちの1つを更新する必要があります。 tomcatポート番号の変更を試みてください。

また、tomcatの資格情報を使用してログインすると、tomcatアプリケーションが保護されている可能性があります。 tomcat-users.xmlを参照してください。

0

私はPOM.xmlにSpringSecurityを追加しました。それが追加されると、Spring Bootは自動的にいくつかの設定を事前に設定します - セキュリティを追加します。

構成クラスを追加して正常に動作します。

@Configuration 

パブリッククラスSecurityConfigurationはWebSecurityConfigurerAdapter {

@Override 
protected void configure(HttpSecurity httpSecurity) throws Exception { 
    httpSecurity 
      .authorizeRequests() 
      .antMatchers("/") 
      .permitAll(); 

    // disabling csrf tokens and x-frame-options to be able to run h2 console (localhost:8080/console) 
    httpSecurity.csrf().disable(); 
    httpSecurity.headers().frameOptions().disable(); 
} 

}

を拡張します
関連する問題