Database not found, and IFEXISTS=true, so we cant auto-create it

后端 未结 17 2900
不思量自难忘°
不思量自难忘° 2020-12-15 06:20

I am getting error after opening the h2 database console. I enter database name but it is showing database not found error:

Database \"C:/Users/Barlek

17条回答
  •  时光说笑
    2020-12-15 07:21

    use the below properties in the pom.xml and run the application again.

        
    
        4.0.0
    
    com.in28minutes.database
    database-demo
    0.0.1-SNAPSHOT
    jar
    
    database-demo
    Demo project for Spring Boot
    
    
        org.springframework.boot
        spring-boot-starter-parent
        2.0.0.RELEASE
         
    
    
    
        UTF-8
        UTF-8
        1.8
    
    
    
        
            org.springframework.boot
            spring-boot-starter-data-jpa
        
        
            org.springframework.boot
            spring-boot-starter-jdbc
        
        
            org.springframework.boot
            spring-boot-starter-web
        
    
        
            com.h2database
            h2
            runtime
        
    
        
            org.springframework.boot
            spring-boot-starter-test
            test
        
    
    
    
    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
            
        
    
    
    
        
            spring-snapshots
            Spring Snapshots
            https://repo.spring.io/snapshot
            
                true
            
        
        
            spring-milestones
            Spring Milestones
            https://repo.spring.io/milestone
            
                false
            
        
    
    
    
        
            spring-snapshots
            Spring Snapshots
            https://repo.spring.io/snapshot
            
                true
            
        
        
            spring-milestones
            Spring Milestones
            https://repo.spring.io/milestone
            
                false
            
        
    
    

提交回复
热议问题