Releases: apache/grails-core
Grails 2.0.4
This release contains bug fixes and improvements.
For information about Grails 2.0 see the following links:
For information about Grails 2.0 see the following links:
v2.0.3
This release contains bug fixes and improvements.
For information about Grails 2.0 see the following links:
For information about Grails 2.0 see the following links:
Grails 2.0.2
This release contains bug fixes and improvements.
In addition there are important improvements to data binding. See Jeff's blog on the topic for details.
In Grails 2.0.2 the data binding mechanism will by default exclude all properties which are static, transient or dynamically typed. You may need to specify "bindable:true" in your constraints block in order to upgrade. Example presented below:
class User {
String email
String passwordHash
static transients = ['password']
def setPassword(password) {
passwordHash = email + password
}
static constraints = {
password bindable:true
}
}
For information about Grails 2.0 see the following links:
For information about Grails 2.0 see the following links:
Grails 1.3.8
For information about Grails 1.3.8, see the following links:
Grails 2.0.1
Release Information
This release contains bug fixes and improvements.
For information about Grails 2.0 see the following links:
Grails 2.0.0
Release Information
Grails 1.3.7
New Features & Improvements
Updated Groovy
Grails 1.3.7 now bundles Groovy 1.7.8.
Masking Request Parameters From Stacktrace Logs
When Grails logs a stacktrace, the log message may include the names and values of all of the request parameters for the current request. To mask out the values of secure request parameters, specify the parameter names in the @grails.exceptionresolver.params.exclude@ config property:
grails.exceptionresolver.params.exclude = ['password', 'creditCard']
Request parameter logging may be turned off altogether by setting the grails.exceptionresolver.logRequestParameters config property to false . The default value is true when the application is running in DEVELOPMENT mode and false for all other modes.
grails.exceptionresolver.logRequestParameters = false
Grails 1.3.6
Release Information
New Features
- Use GORM for Hibernate in a Groovy Script
- Best Effort 1PC Pattern for Transactions Across Multiple DataSources, read upgrade notes below
- Production DataSource Exported via JMX for dataSource with
jmxEnabled = truein properties
Update Notes
Updated Plugins
If you are upgrading from previous versions of Grails 2.3.x and you use the Hibernate and/or Tomcat plugins you will need to update the versions in BuildConfig:
build ':tomcat:7.0.50.1'
runtime ':hibernate:3.6.10.8'
Changes to Dependency Graph
Grails 2.3.6 makes some changes to the dependency graph inhertied by all applications. If you are excluding dependencies from the framework you may need to alter your exclusion rules.
Changes to transactions across multiple datasources
In previous Grails versions, additional datasources didn't take part in transactions initiated in Grails. The transactions in additional datasources were basically in auto commit mode. In some cases this might be the wanted behavior. One reason might be performance: on the start of each new transaction, the BE1PC transaction manager creates a new transaction to each datasource. It's possible to leave an additional datasource out of the BE1PC transaction manager by setting @transactional = false@ in the respective configuration block of the additional dataSource.
By default, the BE1PC implementation will add all beans implementing the Spring PlatformTransactionManager interface to the chained BE1PC transaction manager. You can use different configuration options for controlling this behaviour.
There is more details of this feature in the Transactions across multiple datasources section.
Changes to previous Grails 2.3.x releases
DataSource.groovy (before 2.3.6)
The default dataSource properties have been revised due to database connection problems that many users were having.
These are the new defaults.
properties {
// See http://grails.org/doc/latest/guide/conf.html#dataSource for documentation
jmxEnabled = true
initialSize = 5
maxActive = 50
minIdle = 5
maxIdle = 25
maxWait = 10000
maxAge = 10 * 60000
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
validationQuery = "SELECT 1"
validationQueryTimeout = 3
validationInterval = 15000
testOnBorrow = true
testWhileIdle = true
testOnReturn = false
jdbcInterceptors = "ConnectionState;StatementCache(max=200)"
defaultTransactionIsolation = java.sql.Connection.TRANSACTION_READ_COMMITTED
}
It's now also possible to add database driver specific properties to "dbProperties". This feature is usefull in fine tuning MySQL JDBC driver properties. There is an example on Stackoverflow.
UrlMappings.groovy (before 2.3.5)
replace this line
"/$controller/$action?/$id?(.${format})?"{
with
"/$controller/$action?/$id?(.$format)?"{
Grails 1.2.5
Grails 1.2.5 is a minor release of Grails with bug fixes and improvements.
Further information about the release can be obtained using the links below:
See the Grails 1.2 release notes for more information about new features.
Grails 1.3.5
For further information about the release see the below links:
New Features & Improvements
Now using Groovy 1.7.5
Release notes for Groovy 1.7.5 can be found here.
New Feature: Named Queries Now Support Sorting
The list method attached to named queries now support the same parameters as the static list method that is added to domain classes including "sort", "ordering", "ignoreCase" etc...
Person.recentPublications.list(
sort: 'title', order: 'desc', ignoreCase: true)
New feature: view information about templates used to render a single url
Related issue: GRAILS-5163
GSP templates are re-used in large web applications by using the g:render taglib. A lot of small templates can be used to render a single page.
It might be hard to find out what gsp template actually renders the html seen in the result.
The debug templates -feature adds html comments to the output. The comments contain debug information about gsp templates used to render the page.
Usage is simple: append "?debugTemplates" or "&debugTemplates" to the url and view the source of the result in your browser.
"debugTemplates" is restricted to the development mode.
Here is an example of comments added by debugTemplates :
<!-- GSP #2 START template: /home/user/sampleapp/grails-app/views/_carousel.gsp precompiled: false lastmodified: 22.6.2010 10:45 -->
.
.
.
<!-- GSP #2 END template: /home/user/sampleapp/grails-app/views/_carousel.gsp rendering time: 115 ms -->
Each comment block has a unique id so that you can find the start & end of each template call.
Improvement: GSP reloading is supported for precompiled GSPs now
Related issue: GRAILS-5787
Details are in the Grails reference documentation
i18n reloading is also enabled if GSP reloading is enabled. New message_*.properties files won't be detected. Only changes to existing properties files are reloaded (5 sec interval).
Example of enabling GSP reloading in Config.groovy.
grails.gsp.reload.enable = true
It has been tested with Tomcat, that you can directly edit the GSP files found in the "exploded war directory" found f.e. in tomcat_home/webapps/myapp-0.1/WEB-INF/grails-app/views . You can also edit the messages.properties files found in the tomcat_home/webapps/myapp-0.1/WEB-INF/grails-app/i18n directory. Make sure you backup your changes if you are using war-files for deployment. The changes will get overwritten by Tomcat when you deploy a new version of the application. You might even lose your changes after a restart if you use war-file deployment. Therefore it's recommended to use "exploded war deployment" if you plan to use this feature.
Improvement: URL link creation is cached by default
Grails will cache links created with the g:createLink tag (and other tags that create links using the Grails UrlMappingsHolder/UrlCreator interfaces) in a weighted LRU cache. The size of the cache is 160000 characters by default. The maximum cache size (number of characters in the cache) can be controlled with grails.urlcreator.cache.maxsize config parameter:
// set UrlCreatorCache size to 200000 characters
grails.urlcreator.cache.maxsize = 200000
// disable UrlCreatorCache
grails.urlcreator.cache.maxsize = 0
The LRU cache implementation is [concurrentlinkedhashmap|https://code.google.com/p/concurrentlinkedhashmap/] 1.0_jdk5. This is a new dependency in Grails 1.3.5.
The same cache implementation is used for caching url matches (GRAILS-6622, fixes a memory leak in url matching).
Improvement: The application instance can be easily accessed inside resources.groovy
Related issue: GRAILS-6363
Previously you had to either use the ApplicationHolder (or ConfigurationHolder if you wanted the config) to get access to this. Now you can just refer to "application"�.
import my.company.mock.MockImpl
import my.company.MyBeanImpl
beans = {
if (application.config.my.company.mockService) {
myBean(MockImpl) {
bookService = ref("bookService")
}
}
else {
myBean(MyBeanImpl) {
bookService = ref("bookService")
}
}
}
New Feature: Enhancements to functional testing support
The functional testing support provided to plugins has been enhanced to include testing remote instances or running tests against a WAR deployed version of the application. Not all testing plugins will be immediately compatible, but support should follow quickly.
For more information see the functional testing section in the manual
Improvement: Tomcat JVM can be configured when using run-war
By default, the Tomcat plugin uses a forked JVM with a max heap size of 512m which may not be enough for your application. You can now control the JVM options via the the following parameter in BuildConfig.groovy:
grails.tomcat.jvmArgs = ["-Xmx1024m", "-XX:MaxPermSize=256m"]
Notice about performance when grails.logging.jul.usebridge is enabled
The default Config.groovy for new Grails applications has grails.logging.jul.usebridge setting enabled (GRAILS-6778, will change in 1.3.6).
The SLF4J documentation mentions the negative performance impact of the [JUL to SLF4J bridge|http://www.slf4j.org/legacy.html#jul-to-slf4j].
In Grails applications it's recommended not to enable grails.logging.jul.usebridge in production environments.
This release includes previous fixes in 1.3.x release train.