数据库 – 我可以配置没有数据源的Grails吗?

我有一个Grails应用程序,它从xml文件加载其数据并通过罗马提供RSS提要。我没有任何域类,我的应用程序没有数据源。我不希望Grails在应用程序不需要时加载内存中的hsql db。删除DataSource.groovy文件阻止我启动Web应用程序,似乎需要数据源,但如果我的应用程序不需要数据源,我还能做些什么吗?

解决方法

以下步骤适用于在不使用数据源的情况下运行的新应用程序(Grails 1.1.1):
grails create-app nodb
cd nodb
grails uninstall-plugin hibernate
rm grails-app/conf/DataSource.groovy
grails create-controller Foo
<add "render "hi bar" to the index closure of ./grails-app/controllers/FooController.groovy>
grails run-app
http://localhost:8080/nodb/foo - prints hi bar

对于至少1.1版本的现有应用程序(想想当hibernate成为插件时),你应该能够卸载-lugin并删除DataSource.groovy文件

相关文章

SELECT a.*,b.dp_name,c.pa_name,fm_name=(CASE WHEN a.fm_n...
if not exists(select name from syscolumns where name=&am...
select a.*,pano=a.pa_no,b.pa_name,f.dp_name,e.fw_state_n...
要在 SQL Server 2019 中设置定时自动重启,可以使用 Window...
您收到的错误消息表明数据库 &#39;EastRiver&#39; 的...
首先我需要查询出需要使用SQL Server Profiler跟踪的数据库标...