Example usage for org.springframework.boot.autoconfigure.jdbc DataSourceInitializer initSchema

List of usage examples for org.springframework.boot.autoconfigure.jdbc DataSourceInitializer initSchema

Introduction

In this page you can find the example usage for org.springframework.boot.autoconfigure.jdbc DataSourceInitializer initSchema.

Prototype

void initSchema() 

Source Link

Document

Initialize the schema if necessary.

Usage

From source file:org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker.java

@Override
public void onApplicationEvent(DataSourceSchemaCreatedEvent event) {
    // NOTE the event can happen more than once and
    // the event datasource is not used here
    DataSourceInitializer initializer = getDataSourceInitializer();
    if (!this.initialized && initializer != null) {
        initializer.initSchema();
        this.initialized = true;
    }/*from  ww w .j  a  va2 s  .c o  m*/
}