Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE `ggloor`.`teams` (
- `idteam` INT NOT NULL AUTO_INCREMENT,
- `name` VARCHAR(45) NULL,
- PRIMARY KEY (`idteam`));
- hibernate:
- cache:
- queries: false
- use_second_level_cache: true
- use_query_cache: false
- region.factory_class: org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory
- dataSource:
- pooled: true
- jmxExport: true
- driverClassName: com.mysql.jdbc.Driver
- username: root
- password: 1111
- environments:
- development:
- dataSource:
- dbCreate: create-drop
- url: jdbc:mysql://localhost:3306/ggloor?useSSL=false
- test:
- dataSource:
- dbCreate: create-drop
- url: jdbc:mysql://localhost:3306/ggloor?autoreconnect=true;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
- production:
- dataSource:
- dbCreate: create-drop
- url: jdbc:mysql://localhost:3306/ggloor?autoreconnect=true;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
- properties:
- jmxEnabled: true
- initialSize: 5
- maxActive: 50
- minIdle: 5
- maxIdle: 25
- maxWait: 10000
- maxAge: 600000
- timeBetweenEvictionRunsMillis: 5000
- minEvictableIdleTimeMillis: 60000
- validationQuery: SELECT 1
- validationQueryTimeout: 3
- validationInterval: 15000
- testOnBorrow: true
- testWhileIdle: true
- testOnReturn: false
- jdbcInterceptors: ConnectionState
- defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED
- package testgrails12
- import grails.persistence.Entity
- @Entity
- class Teams {
- Integer idteam
- String name
- static constraints = {
- }
- }
- package testgrails12
- class BdconnectController {
- def index() {
- def team = Teams.get(1)
- team.delete()
- team.save()
- render "hello"
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement