Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more updates for grails 7 #238

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 27 additions & 26 deletions examples/audit-test-allow-update-outside-transaction/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,36 +47,37 @@ configurations {
}

dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
compileOnly "org.springframework.boot:spring-boot-starter-logging"
compileOnly "org.springframework.boot:spring-boot-autoconfigure"
compileOnly "org.grails:grails-core"
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
compileOnly "org.springframework.boot:spring-boot-starter-tomcat"
compileOnly "org.grails:grails-web-boot"
compileOnly "org.grails:grails-logging"
compileOnly "org.grails:grails-plugin-rest"
compileOnly "org.grails:grails-plugin-databinding"
compileOnly "org.grails:grails-plugin-i18n"
compileOnly "org.grails:grails-plugin-services"
compileOnly "org.grails:grails-plugin-url-mappings"
compileOnly "org.grails:grails-plugin-interceptors"
compileOnly "org.grails.plugins:cache"
compileOnly "org.grails.plugins:async"
compileOnly "org.grails.plugins:scaffolding"
compileOnly "org.grails.plugins:events"
compileOnly "org.grails.plugins:hibernate5"
compileOnly "org.grails.plugins:gsp"
implementation project(":audit-logging")
implementation "org.apache.groovy:groovy"
developmentOnly "org.springframework.boot:spring-boot-devtools"
implementation "org.grails:grails-core"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-web-boot"
implementation "org.grails.plugins:gsp"
implementation "org.grails.plugins:hibernate5"
implementation "org.grails.plugins:scaffolding"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.springframework.boot:spring-boot-starter"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.springframework.boot:spring-boot-starter-validation"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails"
testCompileOnly "org.grails:grails-gorm-testing-support"
testCompileOnly "org.mockito:mockito-core"
runtimeOnly "org.fusesource.jansi:jansi"
integrationTestImplementation testFixtures("org.grails.plugins:geb")
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.grails:grails-web-testing-support"
testImplementation "org.spockframework:spock-core"

implementation project(":audit-logging")
profile "org.grails.profiles:web"
}

task wrapper(type: Wrapper) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ environments:
development:
dataSource:
dbCreate: "create-drop"
url: "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
test:
dataSource:
dbCreate: "update"
url: "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
dataSources:
second:
dbCreate: "update"
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
production:
dataSource:
dbCreate: "update"
url: "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
properties:
maxActive: -1
minEvictableIdleTimeMillis: 1800000
Expand All @@ -109,4 +109,4 @@ environments:
dataSources:
second:
dbCreate: "update"
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<root level="ERROR">
<appender-ref ref="CONSOLE"/>
</root>


<!-- logging to a file-->
<!-- <property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}spring.log}"/>-->
<!-- <include resource="org/springframework/boot/logging/logback/file-appender.xml" />-->
<!-- <root level="INFO">-->
<!-- <appender-ref ref="FILE" />-->
<!-- </root>-->

<!-- add logging.file.name to application.yml-->

<springProfile name="development">
<logger name="StackTrace" level="ERROR" additivity="false"/>
<logger name="ahr" level="DEBUG"/>
<logger name="ahr" level="DEBUG"/>
<logger name="io.awspring.cloud" level="DEBUG"/>
<logger name="grails.spring.BeanBuilder" level="DEBUG"/>
<logger name="org.hibernate.orm.deprecation" level="OFF"/> <!--HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated-->
<logger name="grails.boot" level="DEBUG"/>

<!-- <logger name="org.hibernate.SQL" level="DEBUG"/>-->
<!-- <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE"/>-->
<root level="WARN"/>
</springProfile>
</configuration>

This file was deleted.

45 changes: 23 additions & 22 deletions examples/audit-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,35 +47,36 @@ configurations {

dependencies {
developmentOnly "org.springframework.boot:spring-boot-devtools"
compileOnly "org.springframework.boot:spring-boot-starter-logging"
compileOnly "org.springframework.boot:spring-boot-autoconfigure"
compileOnly "org.springframework.boot:spring-boot-starter-actuator"
compileOnly "org.springframework.boot:spring-boot-starter-tomcat"
compileOnly "org.grails:grails-web-boot"
compileOnly "org.grails:grails-logging"
compileOnly "org.grails:grails-plugin-rest"
compileOnly "org.grails:grails-plugin-databinding"
compileOnly "org.grails:grails-plugin-i18n"
compileOnly "org.grails:grails-plugin-services"
compileOnly "org.grails:grails-plugin-url-mappings"
compileOnly "org.grails:grails-plugin-interceptors"
compileOnly "org.grails.plugins:cache"
compileOnly "org.grails.plugins:async"
compileOnly "org.grails.plugins:scaffolding"
compileOnly "org.grails.plugins:events"
compileOnly "org.grails.plugins:gsp"
implementation "org.grails:grails-core"
implementation project(":audit-logging")
implementation "org.apache.groovy:groovy"
implementation "org.grails:grails-logging"
implementation "org.grails:grails-plugin-databinding"
implementation "org.grails:grails-plugin-i18n"
implementation "org.grails:grails-plugin-interceptors"
implementation "org.grails:grails-plugin-rest"
implementation "org.grails:grails-plugin-services"
implementation "org.grails:grails-plugin-url-mappings"
implementation "org.grails:grails-web-boot"
implementation "org.grails.plugins:gsp"
implementation "org.grails.plugins:hibernate5"
implementation "org.grails.plugins:scaffolding"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.springframework.boot:spring-boot-starter"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-tomcat"
implementation "org.springframework.boot:spring-boot-starter-validation"
console "org.grails:grails-console"
profile "org.grails.profiles:web"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails"
runtimeOnly "com.h2database:h2"
runtimeOnly "org.apache.tomcat:tomcat-jdbc"
runtimeOnly "com.bertramlabs.plugins:asset-pipeline-grails"
runtimeOnly "org.fusesource.jansi:jansi"
integrationTestImplementation testFixtures("org.grails.plugins:geb")
testImplementation "org.grails:grails-gorm-testing-support"
testImplementation "org.grails:grails-web-testing-support"
testCompileOnly "org.mockito:mockito-core"
testImplementation "org.spockframework:spock-core"

implementation project(":audit-logging")
profile "org.grails.profiles:web"
}

task wrapper(type: Wrapper) {
Expand Down
12 changes: 6 additions & 6 deletions examples/audit-test/grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,24 @@ environments:
development:
dataSource:
dbCreate: "create-drop"
url: "jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
dataSources:
second:
dbCreate: "update"
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
test:
#we test with several configured datasources. See GPAUDITLOGGING-64
dataSource:
dbCreate: "update"
url: "jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
dataSources:
second:
dbCreate: "update"
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
production:
dataSource:
dbCreate: "update"
url: "jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
properties:
maxActive: -1
minEvictableIdleTimeMillis: 1800000
Expand All @@ -113,4 +113,4 @@ environments:
dataSources:
second:
dbCreate: "update"
url: "jdbc:h2:mem:testDb2;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
url: "jdbc:h2:mem:testDb2;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE"
34 changes: 34 additions & 0 deletions examples/audit-test/grails-app/conf/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<statusListener class="ch.qos.logback.core.status.NopStatusListener" />
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
<root level="ERROR">
<appender-ref ref="CONSOLE"/>
</root>


<!-- logging to a file-->
<!-- <property name="LOG_FILE" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}/}spring.log}"/>-->
<!-- <include resource="org/springframework/boot/logging/logback/file-appender.xml" />-->
<!-- <root level="INFO">-->
<!-- <appender-ref ref="FILE" />-->
<!-- </root>-->

<!-- add logging.file.name to application.yml-->

<springProfile name="development">
<logger name="StackTrace" level="ERROR" additivity="false"/>
<logger name="ahr" level="DEBUG"/>
<logger name="ahr" level="DEBUG"/>
<logger name="io.awspring.cloud" level="DEBUG"/>
<logger name="grails.spring.BeanBuilder" level="DEBUG"/>
<logger name="org.hibernate.orm.deprecation" level="OFF"/> <!--HHH90000022: Hibernate's legacy org.hibernate.Criteria API is deprecated-->
<logger name="grails.boot" level="DEBUG"/>

<!-- <logger name="org.hibernate.SQL" level="DEBUG"/>-->
<!-- <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE"/>-->
<root level="WARN"/>
</springProfile>
</configuration>

32 changes: 0 additions & 32 deletions examples/audit-test/grails-app/conf/logback.groovy

This file was deleted.

2 changes: 1 addition & 1 deletion examples/audit-test/grails-app/domain/test/Tunnel.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ class Tunnel implements Auditable {
String description

static constraints = {
description maxSize:1073741824, nullable:true
description maxSize:1000000000, nullable:true
}
}
6 changes: 3 additions & 3 deletions plugin/grails-app/conf/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ environments:
development:
dataSource:
dbCreate: create-drop
url: jdbc:h2:mem:devDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
test:
dataSource:
dbCreate: update
url: jdbc:h2:mem:testDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
production:
dataSource:
dbCreate: update
url: jdbc:h2:prodDb;MVCC=TRUE;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
url: jdbc:h2:prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE
properties:
jmxEnabled: true
initialSize: 5
Expand Down
Loading