“No Persistence Unit Found” error

后端 未结 4 1305
不知归路
不知归路 2021-02-05 09:14

I am getting the following error:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name \'org.springframework.transaction.interc         


        
4条回答
  •  半阙折子戏
    2021-02-05 09:35

    Well I usually place the persistence.xml in a resources folder /src/main/resouces/META-INF/persistence.xml because I do remember problems in the build not copying the resources to the output-directory.

    I just had a look at our configuration and it looks a little different:

    
    
        
    
    
    
    
    
    
        
            
                classpath*:META-INF/persistence.xml
            
        
        
    
    
    
        
    
    
    
    
        
            
        
        
            
        
        
            
                
                
            
        
        
            
                ${cweb.database.dialect}
                ${cweb.database.generate}
                ${cwb.home}/indexes
                de.cware.cweb.jpa.QuotingNamingStrategy
            
        
        
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    

    Hope this helps :-)

    Chris

提交回复
热议问题