2017-08-24 51 views
0

我正在爲我的項目使用spring-data-jpa,它處理創建數據庫,當我在我的機器上使用windows時,一切都很好,但是當部署到Linux機器的應用打破了說表找不到無法在彈簧數據中使用大寫創建表jpa

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'sframele_levelsDB.Store' doesn't exist 

表名的情況下在Linux機器上的敏感,由於某種原因,即使我在實體正在指定表名是小寫JPA是尋找商店不存儲

@Entity 
@Table(name="store") 
public class Store { 

我試過了GE的名字存儲

@Entity 
@Table(name="Store") 
public class Store { 

但所創建的表還是小寫,我嘗試了幾種命名策略,但沒有奏效

spring.jpa.hibernate.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy 

也試過

spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl 

任何幫助表示讚賞

+0

'spring.jpa.hibernate.naming.implicit策略= org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy' 'spring.jpa.hibernate.naming.physical策略= org.springframework.boot。 orm.jpa.hibernate.SpringPhysicalNamingStrategy'? – Cepr0

回答

0

使用

@Table(name="`Store`") 

改爲。

相關問題