Skip to content

Instantly share code, notes, and snippets.

@jesty
Created June 16, 2016 07:37
Show Gist options
  • Save jesty/6cb2501f02447f6d33f1facfeff60e45 to your computer and use it in GitHub Desktop.
Save jesty/6cb2501f02447f6d33f1facfeff60e45 to your computer and use it in GitHub Desktop.
Use H2 console with Spring Boot
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@Configuration
public class WebConfiguration extends WebSecurityConfigurerAdapter
{
@Override
protected void configure(HttpSecurity http) throws Exception
{
//...
http.csrf().disable();
http.headers().frameOptions().disable();
//...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment