ing
This commit is contained in:
parent
9bde4d74ec
commit
fa4826055a
|
@ -44,6 +44,10 @@ public class JdbcConfiguration implements TransactionManagementConfigurer {
|
||||||
private String dialect;
|
private String dialect;
|
||||||
@Value("${jpa.hibernate.ddl-auto}")
|
@Value("${jpa.hibernate.ddl-auto}")
|
||||||
private String hbm2ddlAuto;
|
private String hbm2ddlAuto;
|
||||||
|
@Value("${jpa.show-sql}")
|
||||||
|
private Boolean jpaShowSQL;
|
||||||
|
@Value("${jpa.hibernate.naming.physical-strategy}")
|
||||||
|
private String namingPhysicalStrategy;
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public DataSource configureDataSource() {
|
public DataSource configureDataSource() {
|
||||||
|
@ -65,7 +69,8 @@ public class JdbcConfiguration implements TransactionManagementConfigurer {
|
||||||
Properties jpaProperties = new Properties();
|
Properties jpaProperties = new Properties();
|
||||||
jpaProperties.put(Environment.DIALECT, dialect);
|
jpaProperties.put(Environment.DIALECT, dialect);
|
||||||
jpaProperties.put(Environment.HBM2DDL_AUTO, hbm2ddlAuto);
|
jpaProperties.put(Environment.HBM2DDL_AUTO, hbm2ddlAuto);
|
||||||
jpaProperties.put(Environment.SHOW_SQL, true);
|
jpaProperties.put(Environment.SHOW_SQL, this.jpaShowSQL);
|
||||||
|
jpaProperties.put(Environment.PHYSICAL_NAMING_STRATEGY, this.namingPhysicalStrategy);
|
||||||
|
|
||||||
entityManagerFactoryBean.setJpaProperties(jpaProperties);
|
entityManagerFactoryBean.setJpaProperties(jpaProperties);
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ datasource.username=overflow
|
||||||
datasource.password=qwer5795
|
datasource.password=qwer5795
|
||||||
datasource.driver-class-name=org.postgresql.Driver
|
datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
|
||||||
jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
|
||||||
jpa.database=postgresql
|
jpa.database=postgresql
|
||||||
jpa.hibernate.ddl-auto=update
|
|
||||||
jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
|
|
||||||
jpa.show-sql=false
|
jpa.show-sql=false
|
||||||
|
jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||||
|
jpa.hibernate.ddl-auto=create
|
||||||
|
jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
|
||||||
|
|
|
@ -19,17 +19,17 @@
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- TRACE > DEBUG > INFO > WARN > ERROR -->
|
<!-- TRACE > DEBUG > INFO > WARN > ERROR -->
|
||||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
<!-- <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
<encoder>
|
<encoder>
|
||||||
<pattern>
|
<pattern>
|
||||||
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{32} - %msg%n
|
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{32} - %msg%n
|
||||||
</pattern>
|
</pattern>
|
||||||
</encoder>
|
</encoder>
|
||||||
</appender>
|
</appender> -->
|
||||||
|
|
||||||
<root level="ERROR">
|
<root level="ERROR">
|
||||||
<appender-ref ref="ROLLING" />
|
<appender-ref ref="ROLLING" />
|
||||||
<appender-ref ref="STDOUT" />
|
<!-- <appender-ref ref="STDOUT" /> -->
|
||||||
</root>
|
</root>
|
||||||
<logger name="com.loafle.overflow" level="ALL" />
|
<logger name="com.loafle.overflow" level="ALL" />
|
||||||
</configuration>
|
</configuration>
|
|
@ -3,9 +3,8 @@ datasource.username=overflow
|
||||||
datasource.password=qwer5795
|
datasource.password=qwer5795
|
||||||
datasource.driver-class-name=org.postgresql.Driver
|
datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
|
||||||
jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
|
||||||
jpa.database=postgresql
|
jpa.database=postgresql
|
||||||
jpa.hibernate.ddl-auto=create
|
|
||||||
#jpa.hibernate.ddl-auto=update
|
|
||||||
jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
|
|
||||||
jpa.show-sql=false
|
jpa.show-sql=false
|
||||||
|
jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||||
|
jpa.hibernate.ddl-auto=update
|
||||||
|
jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
|
||||||
|
|
|
@ -3,9 +3,8 @@ datasource.username=overflow
|
||||||
datasource.password=qwer5795
|
datasource.password=qwer5795
|
||||||
datasource.driver-class-name=org.postgresql.Driver
|
datasource.driver-class-name=org.postgresql.Driver
|
||||||
|
|
||||||
jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
|
||||||
jpa.database=postgresql
|
jpa.database=postgresql
|
||||||
|
jpa.show-sql=false
|
||||||
|
jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
|
||||||
jpa.hibernate.ddl-auto=create
|
jpa.hibernate.ddl-auto=create
|
||||||
#jpa.hibernate.ddl-auto=update
|
jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
|
||||||
jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
|
|
||||||
jpa.show-sql=true
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user