Spring Boot - repository field required a bean named 'entityManagerFactory' that could not be found

后端 未结 5 2157
温柔的废话
温柔的废话 2020-12-06 16:18

I am in the process of developing a Spring Boot application and came across this error when starting the server. I am not sure if I am incorrectly defining any annotations o

5条回答
  •  猫巷女王i
    2020-12-06 16:42

    The problem might be due to version mismatch. Problem can be solve by specifying the dependency like this (since version is not mentioned, its auto managed)

        
            org.springframework.boot
            spring-boot-starter-data-jpa
        
    
    
        
            mysql
            mysql-connector-java
            runtime
        
    
        
            org.springframework.boot
            spring-boot-starter-web
        
    
    

提交回复
热议问题