How can i make a init-sql in Spring Boot-1.4.1-RELEASE -


i developing spring boot application:

using dependencies:

    dependencies {     compile("org.springframework.boot:spring-boot-starter-web:1.4.1.release")     compile('org.springframework.boot:spring-boot-starter-data-jpa:1.4.1.release')     compile('mysql:mysql-connector-java:5.1.39') } 

i want run sql on init:

set names 'utf8mb4' 

to support emoji read/write

i make these configs on application.properties

spring.datasource.tomcat.init-sql=set names 'utf8mb4' spring.datasource.init-sql=set names 'utf8mb4' spring.datasource.connection-init-sql=set names 'utf8mb4' 

but can't make work, , there no log on application startup.

i think found answer, according answer:

the right properties be:

spring.datasource.tomcat.initsql=set names 'utf8mb4' 

then exec on connection.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -