Skip to content

Commit f03d9df

Browse files
more updates for grails 7 (#238)
Co-authored-by: James Fredley <[email protected]>
1 parent 1a51973 commit f03d9df

File tree

10 files changed

+133
-127
lines changed

10 files changed

+133
-127
lines changed

examples/audit-test-allow-update-outside-transaction/build.gradle

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,36 +47,37 @@ configurations {
4747
}
4848

4949
dependencies {
50-
developmentOnly("org.springframework.boot:spring-boot-devtools")
51-
compileOnly "org.springframework.boot:spring-boot-starter-logging"
52-
compileOnly "org.springframework.boot:spring-boot-autoconfigure"
53-
compileOnly "org.grails:grails-core"
54-
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
55-
compileOnly "org.springframework.boot:spring-boot-starter-tomcat"
56-
compileOnly "org.grails:grails-web-boot"
57-
compileOnly "org.grails:grails-logging"
58-
compileOnly "org.grails:grails-plugin-rest"
59-
compileOnly "org.grails:grails-plugin-databinding"
60-
compileOnly "org.grails:grails-plugin-i18n"
61-
compileOnly "org.grails:grails-plugin-services"
62-
compileOnly "org.grails:grails-plugin-url-mappings"
63-
compileOnly "org.grails:grails-plugin-interceptors"
64-
compileOnly "org.grails.plugins:cache"
65-
compileOnly "org.grails.plugins:async"
66-
compileOnly "org.grails.plugins:scaffolding"
67-
compileOnly "org.grails.plugins:events"
68-
compileOnly "org.grails.plugins:hibernate5"
69-
compileOnly "org.grails.plugins:gsp"
70-
implementation project(":audit-logging")
71-
implementation "org.apache.groovy:groovy"
50+
developmentOnly "org.springframework.boot:spring-boot-devtools"
51+
implementation "org.grails:grails-core"
52+
implementation "org.grails:grails-logging"
53+
implementation "org.grails:grails-plugin-databinding"
54+
implementation "org.grails:grails-plugin-i18n"
55+
implementation "org.grails:grails-plugin-interceptors"
56+
implementation "org.grails:grails-plugin-rest"
57+
implementation "org.grails:grails-plugin-services"
58+
implementation "org.grails:grails-plugin-url-mappings"
59+
implementation "org.grails:grails-web-boot"
60+
implementation "org.grails.plugins:gsp"
61+
implementation "org.grails.plugins:hibernate5"
62+
implementation "org.grails.plugins:scaffolding"
63+
implementation "org.springframework.boot:spring-boot-autoconfigure"
64+
implementation "org.springframework.boot:spring-boot-starter"
65+
implementation "org.springframework.boot:spring-boot-starter-actuator"
66+
implementation "org.springframework.boot:spring-boot-starter-logging"
67+
implementation "org.springframework.boot:spring-boot-starter-tomcat"
68+
implementation "org.springframework.boot:spring-boot-starter-validation"
7269
console "org.grails:grails-console"
73-
profile "org.grails.profiles:web"
70+
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails"
7471
runtimeOnly "com.h2database:h2"
7572
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
76-
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails"
77-
testCompileOnly "org.grails:grails-gorm-testing-support"
78-
testCompileOnly "org.mockito:mockito-core"
73+
runtimeOnly "org.fusesource.jansi:jansi"
74+
integrationTestImplementation testFixtures("org.grails.plugins:geb")
75+
testImplementation "org.grails:grails-gorm-testing-support"
7976
testImplementation "org.grails:grails-web-testing-support"
77+
testImplementation "org.spockframework:spock-core"
78+
79+
implementation project(":audit-logging")
80+
profile "org.grails.profiles:web"
8081
}
8182

8283
task wrapper(type: Wrapper) {

examples/audit-test-allow-update-outside-transaction/grails-app/conf/application.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,19 @@ environments:
8383
development:
8484
dataSource:
8585
dbCreate: "create-drop"
86-
url: "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
86+
url: "jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
8787
test:
8888
dataSource:
8989
dbCreate: "update"
90-
url: "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
90+
url: "jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
9191
dataSources:
9292
second:
9393
dbCreate: "update"
94-
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
94+
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
9595
production:
9696
dataSource:
9797
dbCreate: "update"
98-
url: "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
98+
url: "jdbc:h2:prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
9999
properties:
100100
maxActive: -1
101101
minEvictableIdleTimeMillis: 1800000
@@ -109,4 +109,4 @@ environments:
109109
dataSources:
110110
second:
111111
dbCreate: "update"
112-
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
112+
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configuration>
3+
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
4+
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
5+
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
6+
<root level="ERROR">
7+
<appender-ref ref="CONSOLE"/>
8+
</root>
9+
10+
11+
<!-- logging to a file-->
12+
<!-- <property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}spring.log}"/>-->
13+
<!-- <include resource="org/springframework/boot/logging/logback/file-appender.xml" />-->
14+
<!-- <root level="INFO">-->
15+
<!-- <appender-ref ref="FILE" />-->
16+
<!-- </root>-->
17+
18+
<!-- add logging.file.name to application.yml-->
19+
20+
<springProfile name="development">
21+
<logger name="StackTrace" level="ERROR" additivity="false"/>
22+
<logger name="ahr" level="DEBUG"/>
23+
<logger name="ahr" level="DEBUG"/>
24+
<logger name="io.awspring.cloud" level="DEBUG"/>
25+
<logger name="grails.spring.BeanBuilder" level="DEBUG"/>
26+
<logger name="org.hibernate.orm.deprecation" level="OFF"/> <!--HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated-->
27+
<logger name="grails.boot" level="DEBUG"/>
28+
29+
<!-- <logger name="org.hibernate.SQL" level="DEBUG"/>-->
30+
<!-- <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE"/>-->
31+
<root level="WARN"/>
32+
</springProfile>
33+
</configuration>
34+

examples/audit-test-allow-update-outside-transaction/grails-app/conf/logback.groovy

Lines changed: 0 additions & 32 deletions
This file was deleted.

examples/audit-test/build.gradle

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,35 +47,36 @@ configurations {
4747

4848
dependencies {
4949
developmentOnly "org.springframework.boot:spring-boot-devtools"
50-
compileOnly "org.springframework.boot:spring-boot-starter-logging"
51-
compileOnly "org.springframework.boot:spring-boot-autoconfigure"
52-
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
53-
compileOnly "org.springframework.boot:spring-boot-starter-tomcat"
54-
compileOnly "org.grails:grails-web-boot"
55-
compileOnly "org.grails:grails-logging"
56-
compileOnly "org.grails:grails-plugin-rest"
57-
compileOnly "org.grails:grails-plugin-databinding"
58-
compileOnly "org.grails:grails-plugin-i18n"
59-
compileOnly "org.grails:grails-plugin-services"
60-
compileOnly "org.grails:grails-plugin-url-mappings"
61-
compileOnly "org.grails:grails-plugin-interceptors"
62-
compileOnly "org.grails.plugins:cache"
63-
compileOnly "org.grails.plugins:async"
64-
compileOnly "org.grails.plugins:scaffolding"
65-
compileOnly "org.grails.plugins:events"
66-
compileOnly "org.grails.plugins:gsp"
6750
implementation "org.grails:grails-core"
68-
implementation project(":audit-logging")
69-
implementation "org.apache.groovy:groovy"
51+
implementation "org.grails:grails-logging"
52+
implementation "org.grails:grails-plugin-databinding"
53+
implementation "org.grails:grails-plugin-i18n"
54+
implementation "org.grails:grails-plugin-interceptors"
55+
implementation "org.grails:grails-plugin-rest"
56+
implementation "org.grails:grails-plugin-services"
57+
implementation "org.grails:grails-plugin-url-mappings"
58+
implementation "org.grails:grails-web-boot"
59+
implementation "org.grails.plugins:gsp"
7060
implementation "org.grails.plugins:hibernate5"
61+
implementation "org.grails.plugins:scaffolding"
62+
implementation "org.springframework.boot:spring-boot-autoconfigure"
63+
implementation "org.springframework.boot:spring-boot-starter"
64+
implementation "org.springframework.boot:spring-boot-starter-actuator"
65+
implementation "org.springframework.boot:spring-boot-starter-logging"
66+
implementation "org.springframework.boot:spring-boot-starter-tomcat"
67+
implementation "org.springframework.boot:spring-boot-starter-validation"
7168
console "org.grails:grails-console"
72-
profile "org.grails.profiles:web"
69+
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails"
7370
runtimeOnly "com.h2database:h2"
7471
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
75-
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails"
72+
runtimeOnly "org.fusesource.jansi:jansi"
73+
integrationTestImplementation testFixtures("org.grails.plugins:geb")
7674
testImplementation "org.grails:grails-gorm-testing-support"
7775
testImplementation "org.grails:grails-web-testing-support"
78-
testCompileOnly "org.mockito:mockito-core"
76+
testImplementation "org.spockframework:spock-core"
77+
78+
implementation project(":audit-logging")
79+
profile "org.grails.profiles:web"
7980
}
8081

8182
task wrapper(type: Wrapper) {

examples/audit-test/grails-app/conf/application.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,24 @@ environments:
8282
development:
8383
dataSource:
8484
dbCreate: "create-drop"
85-
url: "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
85+
url: "jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
8686
dataSources:
8787
second:
8888
dbCreate: "update"
89-
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
89+
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
9090
test:
9191
#we test with several configured datasources. See GPAUDITLOGGING-64
9292
dataSource:
9393
dbCreate: "update"
94-
url: "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
94+
url: "jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
9595
dataSources:
9696
second:
9797
dbCreate: "update"
98-
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
98+
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
9999
production:
100100
dataSource:
101101
dbCreate: "update"
102-
url: "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
102+
url: "jdbc:h2:prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
103103
properties:
104104
maxActive: -1
105105
minEvictableIdleTimeMillis: 1800000
@@ -113,4 +113,4 @@ environments:
113113
dataSources:
114114
second:
115115
dbCreate: "update"
116-
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
116+
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configuration>
3+
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
4+
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
5+
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
6+
<root level="ERROR">
7+
<appender-ref ref="CONSOLE"/>
8+
</root>
9+
10+
11+
<!-- logging to a file-->
12+
<!-- <property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}spring.log}"/>-->
13+
<!-- <include resource="org/springframework/boot/logging/logback/file-appender.xml" />-->
14+
<!-- <root level="INFO">-->
15+
<!-- <appender-ref ref="FILE" />-->
16+
<!-- </root>-->
17+
18+
<!-- add logging.file.name to application.yml-->
19+
20+
<springProfile name="development">
21+
<logger name="StackTrace" level="ERROR" additivity="false"/>
22+
<logger name="ahr" level="DEBUG"/>
23+
<logger name="ahr" level="DEBUG"/>
24+
<logger name="io.awspring.cloud" level="DEBUG"/>
25+
<logger name="grails.spring.BeanBuilder" level="DEBUG"/>
26+
<logger name="org.hibernate.orm.deprecation" level="OFF"/> <!--HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated-->
27+
<logger name="grails.boot" level="DEBUG"/>
28+
29+
<!-- <logger name="org.hibernate.SQL" level="DEBUG"/>-->
30+
<!-- <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE"/>-->
31+
<root level="WARN"/>
32+
</springProfile>
33+
</configuration>
34+

examples/audit-test/grails-app/conf/logback.groovy

Lines changed: 0 additions & 32 deletions
This file was deleted.

examples/audit-test/grails-app/domain/test/Tunnel.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ class Tunnel implements Auditable {
77
String description
88

99
static constraints = {
10-
description maxSize:1073741824, nullable:true
10+
description maxSize:1000000000, nullable:true
1111
}
1212
}

plugin/grails-app/conf/application.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,15 @@ environments:
8080
development:
8181
dataSource:
8282
dbCreate: create-drop
83-
url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
83+
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
8484
test:
8585
dataSource:
8686
dbCreate: update
87-
url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
87+
url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
8888
production:
8989
dataSource:
9090
dbCreate: update
91-
url: jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
91+
url: jdbc:h2:prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
9292
properties:
9393
jmxEnabled: true
9494
initialSize: 5

0 commit comments

Comments
 (0)