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