`
icejadelove
  • 浏览: 138131 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

解决失误导致grails连接mysql错误

阅读更多
"D:\Program Files\Java\jdk1.6.0_14\bin\java" -Xmx256M "-Dgrails.home=D:\Program Files\grails-1.2.0" -Dbase.dir=E:\Progect\java\Intellij\ScheduledTasks "-Dtools.jar=D:\Program Files\Java\jdk1.6.0_14\lib\tools.jar" "-Dgroovy.starter.conf=D:\Program Files\grails-1.2.0/conf/groovy-starter.conf" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=D:\Program Files\JetBrains\IntelliJ IDEA 9.0\bin" -Dfile.encoding=GBK -classpath "D:\Program Files\grails-1.2.0\lib\groovy-all-1.6.7.jar;D:\Program Files\grails-1.2.0\dist\grails-bootstrap-1.2.0.jar;D:\Program Files\JetBrains\IntelliJ IDEA 9.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.groovy.grails.cli.support.GrailsStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf "D:\Program Files\grails-1.2.0/conf/groovy-starter.conf" run-app
Welcome to Grails 1.2.0 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: D:\Program Files\grails-1.2.0

Base Directory: E:\Progect\java\Intellij\ScheduledTasks
Resolving dependencies...
Dependencies resolved in 2092ms.
Running script D:\Program Files\grails-1.2.0\scripts\RunApp.groovy
Environment set to development
  [groovyc] Compiling 1 source file to E:\Progect\java\Intellij\ScheduledTasks\target\classes
   [delete] Deleting directory I:\Users\Jeck\.grails\1.2.0\projects\ScheduledTasks\tomcat
Running Grails application..
2010-01-22 09:30:15,597 [main] ERROR context.ContextLoader  - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:135)
 at grails.web.container.EmbeddableServer$start.call(Unknown Source)
 at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
 at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
 at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:287)
 at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
 at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
 at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
 at _GrailsRun_groovy.runInline(_GrailsRun_groovy:115)
 at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
 at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
 at RunApp$_run_closure1.doCall(RunApp.groovy:33)
 at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
 at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
 at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
 at gant.Gant.withBuildListeners(Gant.groovy:344)
 at gant.Gant.this$2$withBuildListeners(Gant.groovy)
 at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
 at gant.Gant.dispatch(Gant.groovy:334)
 at gant.Gant.this$2$dispatch(Gant.groovy)
 at gant.Gant.invokeMethod(Gant.groovy)
 at gant.Gant.processTargets(Gant.groovy:495)
 at gant.Gant.processTargets(Gant.groovy:480)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
 at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
 ... 24 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
 at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2104)
 at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
 at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
 at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
 at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:283)
 at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
 at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
 at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
 at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
 ... 25 more
Caused by: java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
 at java.net.Socket.connect(Socket.java:519)
 at java.net.Socket.connect(Socket.java:469)
 at java.net.Socket.<init>(Socket.java:366)
 at java.net.Socket.<init>(Socket.java:209)
 at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
 at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2027)
 ... 34 more
2010-01-22 09:30:15,605 [main] ERROR [localhost].[/ScheduledTasks]  - Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:135)
 at grails.web.container.EmbeddableServer$start.call(Unknown Source)
 at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
 at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
 at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:287)
 at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
 at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
 at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
 at _GrailsRun_groovy.runInline(_GrailsRun_groovy:115)
 at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
 at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
 at RunApp$_run_closure1.doCall(RunApp.groovy:33)
 at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
 at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
 at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
 at gant.Gant.withBuildListeners(Gant.groovy:344)
 at gant.Gant.this$2$withBuildListeners(Gant.groovy)
 at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
 at gant.Gant.dispatch(Gant.groovy:334)
 at gant.Gant.this$2$dispatch(Gant.groovy)
 at gant.Gant.invokeMethod(Gant.groovy)
 at gant.Gant.processTargets(Gant.groovy:495)
 at gant.Gant.processTargets(Gant.groovy:480)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Cannot resolve reference to bean 'hibernateProperties' while setting bean property 'hibernateProperties'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateProperties': Cannot resolve reference to bean 'dialectDetector' while setting bean property 'properties' with key [hibernate.dialect]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dialectDetector': Invocation of init method failed; nested exception is org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.jdbc.support.MetaDataAccessException: Could not get Connection for extracting meta data; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 ... 24 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

Last packet sent to the server was 0 ms ago.)
 at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
 at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
 ... 24 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Last packet sent to the server was 0 ms ago.
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
 at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2104)
 at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
 at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
 at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
 at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
 at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:283)
 at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
 at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
 at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
 at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
 ... 25 more
Caused by: java.net.ConnectException: Connection refused: connect
 at java.net.PlainSocketImpl.socketConnect(Native Method)
 at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
 at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
 at java.net.Socket.connect(Socket.java:519)
 at java.net.Socket.connect(Socket.java:469)
 at java.net.Socket.<init>(Socket.java:366)
 at java.net.Socket.<init>(Socket.java:209)
 at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
 at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
 at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2027)
 ... 34 more
2010-01-22 09:30:15,613 [main] ERROR core.StandardContext  - Error listenerStart
2010-01-22 09:30:15,730 [main] ERROR core.StandardContext  - Context [/ScheduledTasks] startup failed due to previous errors
Server running. Browse to http://localhost:8080/ScheduledTasks

Process finished with exit code 1

 以上是错误的细节部分,引起上述错误的原因是因为在开发模式下,默认的数据库创建模式为create-drop,但是若该成update也不会报错,但是当domain类改变的时候,就汇报上面的错误,原因是domain类与数据库无法对应映射了,解决方法是把update改成create-drop就可以了。

dataSource {
	pooled = true
	driverClassName = "com.mysql.jdbc.Driver"
	username = "root"
	password = "1234"
}
hibernate {
    cache.use_second_level_cache=true
    cache.use_query_cache=true
    cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
}
// environment specific settings
environments {
	development {
		dataSource {
			dbCreate = "create-drop" // one of 'create', 'create-drop','update'  &autoReconnect=true&failOverReadOnly=false
			url = "jdbc:mysql://localhost:3306/scheduledtasks?useUnicode=true&characterEncoding=UTF-8"
		}
	}
	test {
		dataSource {
			dbCreate = "update"
			url = "jdbc:hsqldb:mem:testDb"
		}
	}
	production {
		dataSource {
			dbCreate = "update"
			url = "jdbc:hsqldb:file:prodDb;shutdown=true"
		}
	}
}

 

0
0
分享到:
评论

相关推荐

    grails 连接mysql

    这个例子实现了用grails 连接mysql 数据库,并且把内容显示出来,可以增删除改,下载这个例子后大家要把jdk tomcat grails环境搭好,然后用grails run-app来执行,也可以用其它的开发工具,本人用的是netbeans

    Grails Grails Grails

    2. **GORM(Grails Object Relational Mapping)**: GORM 是Grails的ORM框架,提供了与数据库交互的能力,支持关系型数据库,如MySQL、PostgreSQL等。它提供了CRUD操作,以及事务管理和动态查询。 3. **插件系统**...

    Grails权威指南 Grails权威指南

    Grails是一种基于Groovy语言的开源框架,它为构建现代、高效的应用程序提供了简洁高效的解决方案。本指南针对不同层次的开发者,无论你是初学者还是经验丰富的程序员,都能从中受益。 Grails框架的核心特性包括模型...

    grails学习

    当工程启动时,若遇到数据库连接错误,首先要检查 Eclipse 版本和编码设置是否一致。如果问题依旧,可能是因为 CVS 中的某些文件,如 `tld` 文件夹,没有完全下载。确保所有必要的文件都已同步到本地项目中。 2. *...

    Grails入门指南 -- 针对grails1.0.4更新

    - **错误消息自定义**:根据不同的验证失败情况显示特定的错误信息,提高用户体验。 - **动态查询**:支持基于动态条件的查询操作,增加查询灵活性。 - **界面美化**:通过布局和CSS美化页面,提升用户界面的...

    grails login

    Grails默认使用H2内存数据库,如需使用MySQL,需修改`Config.groovy`中的数据库配置。添加如下代码: ```groovy dataSource { pooled = true driverClassName = "com.mysql.jdbc.Driver" username = "your_db_...

    Eclipse下搭建Grails项目

    【Grails项目搭建详解】 Grails是一个基于Groovy语言的开源Web应用框架,它简化了开发过程,尤其适合快速构建动态网站。在Eclipse中搭建Grails项目可能相对复杂,但通过以下步骤,即使是初学者也能顺利进行。 1. *...

    grails-用户手册

    《Grails用户手册》 Grails,作为一个基于Groovy语言的开源Web应用框架,深受开发者喜爱,它简化了Java开发的复杂性,提供了强大的MVC(Model-View-Controller)架构,以及丰富的插件系统。这份用户手册将帮助你...

    grails-2.4.4.zip

    《Grails 2.4.4 框架深度解析》 Grails 2.4.4 是一个基于Java的开源Web应用框架,它利用Groovy语言的强大特性,为开发者提供了一种高效、灵活的开发环境。这个压缩包“grails-2.4.4.zip”包含了完整的Grails 2.4.4...

    Grails企业web应用开发与部署

    1. GORM:Grails的ORM框架,支持关系型数据库如MySQL、PostgreSQL,也支持NoSQL数据库如MongoDB。GORM通过领域类(Domain Class)实现数据建模,提供便捷的数据操作接口。 2. 视图层:Grails支持多种模板引擎,如GSP...

    idea连接mysql数据库.docx

    - **代码分析**:实时检测代码中的错误和潜在问题,并提供解决方案。 - **重构功能**:支持多种重构操作,如重命名、提取方法、改变方法签名等,确保代码的一致性和可维护性。 2. **丰富的插件生态**:拥有一个...

    Grails入门指南-中文版

    这使得Grails成为一个一站式的解决方案,极大地提高了开发者的生产力。本文将详细介绍Grails的基本概念、核心功能以及如何利用它来进行快速Web开发。 #### 二、Grails框架简介 **1. Grails框架的背景** - Grails...

    the definitive guide to grails 2

    Grails拥有丰富的插件生态系统,提供了大量的现成解决方案,涵盖了安全、缓存、邮件、社交网络等功能。插件机制大大简化了功能的添加和定制,使得开发者可以专注于核心业务逻辑,而无需从头构建所有功能。 总之,...

    grails开发笔记

    ### Grails 开发笔记 #### Grails 概述 Grails 是一款用于 Web 应用开发的开源框架,它基于 Groovy 编程语言,并集成了 Spring、Hibernate 和 SiteMesh 等成熟技术栈。其核心特性之一是“规约取代配置”...

    eclipse开发grails插件

    对于Grails开发,我们需要的是Eclipse中的Grails插件,它能够提供对Grails项目的创建、运行、调试等一系列功能。 **Grails**是基于Groovy语言的全栈式Web开发框架,它借鉴了Ruby on Rails的设计理念,提供了快速...

    grails中文参考手册

    Grails遵循一套默认的规约,比如数据库连接、目录结构等,这减少了大量手动配置的需求。然而,当需要自定义时,可以通过`Config.groovy`配置文件进行修改。 5. **运行与测试** - **运行Grails应用**:使用`grails...

    Grails入门精通及中文API

    - **GORM(Grails Object Relational Mapping)**: 内置的ORM框架,允许开发者通过领域类直接操作数据库,支持各种数据库系统,如MySQL、Oracle和PostgreSQL。 - **GRAILS插件系统**: 允许开发者扩展框架功能,提供...

    使用Grails快速开发Web应用

    - **软件需求**:Grails 1.0rc1、JDK 1.5或更高版本、MySQL和MySQL JDBC Driver(非必需)、Eclipse 3.2或更高版本(带Web Tools和Groovy插件,非必需)。 #### 结语 Grails为Web开发提供了强大的框架支持,尤其...

Global site tag (gtag.js) - Google Analytics