I want to turn off the spring petclinic's automatic recreation and repopulation of its underlying MySQL database every time the app restarts. Can anyone show me how to do this?
每次应用重启时,我都想关闭spring petclinic的自动娱乐和底层MySQL数据库。有人能教我怎么做吗?
The web.xml for the app can be found at this link. And the other xml config files can be found at this link.
网络。可以在此链接中找到应用程序的xml。其他xml配置文件可以在这个链接中找到。
I prefer to run database scripts separately from the application, using the MySQL command line client.
我倾向于使用MySQL命令行客户端与应用程序分开运行数据库脚本。
1 个解决方案
#1
2
In the file datasource-config.xml locate the following configuration
在文件datasource-config。xml定位以下配置。
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${jdbc.initLocation}"/>
<jdbc:script location="${jdbc.dataLocation}"/>
</jdbc:initialize-database>
Just comment out this code, and you should be good to go.
只要注释掉这段代码,就可以了。
#1
2
In the file datasource-config.xml locate the following configuration
在文件datasource-config。xml定位以下配置。
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="${jdbc.initLocation}"/>
<jdbc:script location="${jdbc.dataLocation}"/>
</jdbc:initialize-database>
Just comment out this code, and you should be good to go.
只要注释掉这段代码,就可以了。