spring boot 配置启动后执行sql, 中文乱码
学习了:http://www.cnblogs.com/woshimrf/p/5625474.html
全部的application.yml文件为:
server:
port: 8001
spring:
jpa:
generate-ddl: false
show-sql: true
hibernate:
ddl-auto: none
datasource:
platform: h2
schema: classpath:schema.sql
data: classpath:data.sql
sql-script-encoding: utf-8
application:
name: microservice-provider-user
logging:
level:
root: INFO
org.hibernate: INFO
org.hibernate.type.descriptor.sql.BasicBinder: TRACE
org.hibernate.type.descriptor.sql.BasicExtractor: TRACE
info:
app:
name: @project.artifactId@
encoding: @project.build.sourceEncoding@
java:
source: @java.version@
target: @java.version@
eureka:
client:
service-url:
defaultZone: http://user:password123@localhost:8761/eureka/
instance:
prefer-ip-address: true