I have used the below settings in my Application properties file. But still cant see my tables in h2 console.
application.properties
logging.level.org.springframework.web=INFO
spring.datasource.url=jdbc:h2:mem:challenge;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MV_STORE=FALSE
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.schema=classpath:/schema.sql
spring.datasource.data=classpath:/data.sql
spring.h2.console.enabled=true
spring.h2.console.path=/h2
server.port = 8080
I used the string jdbc:h2:mem:challenge;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;MV_STORE=FALSE
in the JDBC URL on H2 console to login. Yet i am not seeing any tables
The below is my Graddle file
buildscript {
ext {
springBootVersion = '1.4.4.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
jar {
baseName = 'challenge'
version = '0.0.1-SNAPSHOT'
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-jdbc')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-web')
runtime('org.springframework.boot:spring-boot-devtools')
runtime('com.h2database:h2')
testCompile('org.springframework.boot:spring-boot-starter-test')
}
The following is the class which implements Springsecurity for my spring boot app
@Configuration
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests().antMatchers("/h2/*").permitAll();
http.csrf().disable();
http.headers().frameOptions().disable();
}
}