Spring Boot MySQL Database Initialization Error with Stored Procedures

前端 未结 3 1832
执笔经年
执笔经年 2020-12-19 03:29

In a Spring Boot application I am attempting to initialize some MySQL database tables and stored procedures before running integration tests by placing a schema.sql file in

3条回答
  •  悲&欢浪女
    2020-12-19 04:11

    Adding to @Andrews answer:

    When using a custom dataSource that is not automatically created by Spring Boot, it can happen that the spring.datasource.separator property is not used. In this cases the separator is not forwarded to the Populator. In this case it can be set directly in the data source initialization. For example, the following can be used in a special update profile assuming dataSource is defined elsewhere:

    
        
    
    

    Or, when the the populator is explicitly stated:

    
        
        
            
                ${update.schema.script}
            
        
    
    
        
            
        
        
            
        
        
        
    
    

提交回复
热议问题