What's the recommended location for SQL (DDL) scripts?

前端 未结 6 1286
北荒
北荒 2020-12-28 11:46

What\'s the recommended location for SQL, DDL, ... scripts in the Maven standard directory structure?

I bet almost every web project uses a DB and some kind of SQL s

6条回答
  •  心在旅途
    2020-12-28 12:14

    src/main/resources is a good place, but remember it gets packed into your final jar, so it depends if you want to reveal this in your production code or not.

    If not, you can filter out this by adding maven-jar-plugin configuration excerpt to appropriate pom.xml:

    
        org.apache.maven.plugins
        maven-jar-plugin
        
             src/main/resources/privateSubdir/**
        
    
    

提交回复
热议问题