-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '9.0.x' into renovate/gradle-8.x
- Loading branch information
Showing
115 changed files
with
24,864 additions
and
868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
group "examples" | ||
plugins { | ||
id 'groovy' | ||
id 'org.grails.grails-web' | ||
id 'org.grails.plugins.views-json' | ||
} | ||
|
||
|
||
apply plugin:"org.grails.grails-web" | ||
apply plugin:"org.grails.plugins.views-json" | ||
apply plugin: 'java' | ||
version = rootProject.version | ||
group = 'examples' | ||
|
||
dependencies { | ||
implementation "org.springframework.boot:spring-boot-starter-logging" | ||
implementation "org.springframework.boot:spring-boot-autoconfigure" | ||
implementation "org.grails:grails-core" | ||
implementation "org.springframework.boot:spring-boot-starter-actuator" | ||
implementation "org.springframework.boot:spring-boot-starter-tomcat" | ||
implementation "org.grails:grails-dependencies" | ||
implementation "org.grails:grails-plugin-codecs" | ||
implementation "org.grails:grails-plugin-services" | ||
implementation "org.grails:grails-plugin-datasource" | ||
implementation "org.grails:grails-web-boot" | ||
implementation "org.grails:grails-logging" | ||
implementation "org.grails.plugins:cache" | ||
implementation "org.grails.plugins:events" | ||
implementation project(":grails-plugin") | ||
implementation "org.hibernate:hibernate-core-jakarta:$hibernateVersion" | ||
implementation "org.grails.plugins:views-json" | ||
implementation "org.grails.plugins:views-json-templates" | ||
implementation "org.grails.plugins:spring-security-rest:$grailsSpringSecurityRestVersion" | ||
profile "org.grails.profiles:rest-api" | ||
runtimeOnly "org.apache.tomcat:tomcat-jdbc" | ||
testImplementation "org.grails:grails-gorm-testing-support:$testingSupportVersion" | ||
testImplementation "org.grails:grails-web-testing-support:$testingSupportVersion" | ||
|
||
implementation project(':grails-plugin') | ||
implementation 'org.grails:grails-core' | ||
implementation 'org.grails.plugins:views-json' | ||
|
||
runtimeOnly 'com.h2database:h2' | ||
runtimeOnly 'com.zaxxer:HikariCP' | ||
runtimeOnly 'org.grails:grails-plugin-databinding' | ||
runtimeOnly 'org.grails:grails-plugin-i18n' | ||
runtimeOnly 'org.grails:grails-plugin-services' | ||
runtimeOnly 'org.grails:grails-plugin-url-mappings' | ||
runtimeOnly 'org.springframework.boot:spring-boot-autoconfigure' | ||
runtimeOnly 'org.springframework.boot:spring-boot-starter-logging' | ||
runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat' | ||
|
||
integrationTestImplementation 'org.grails:grails-testing-support' | ||
} |
14 changes: 0 additions & 14 deletions
14
examples/grails-data-service/grails-app/conf/application.groovy
This file was deleted.
Oops, something went wrong.
171 changes: 58 additions & 113 deletions
171
examples/grails-data-service/grails-app/conf/application.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,121 +1,66 @@ | ||
grails: | ||
gorm: | ||
multiTenancy: | ||
mode: DISCRIMINATOR | ||
tenantResolverClass: org.grails.datastore.mapping.multitenancy.web.SessionTenantResolver | ||
--- | ||
grails: | ||
profile: rest-api | ||
codegen: | ||
defaultPackage: example | ||
gorm: | ||
reactor: | ||
# Whether to translate GORM events into Reactor events | ||
# Disabled by default for performance reasons | ||
events: false | ||
info: | ||
app: | ||
name: '@info.app.name@' | ||
version: '@info.app.version@' | ||
grailsVersion: '@info.app.grailsVersion@' | ||
spring: | ||
jmx: | ||
unique-names: true | ||
main: | ||
banner-mode: "off" | ||
groovy: | ||
template: | ||
check-template-location: false | ||
devtools: | ||
restart: | ||
additional-exclude: | ||
- '*.gsp' | ||
- '**/*.gsp' | ||
- '*.gson' | ||
- '**/*.gson' | ||
- 'logback.groovy' | ||
- '*.properties' | ||
management: | ||
endpoints: | ||
enabled-by-default: false | ||
|
||
app: | ||
name: '@info.app.name@' | ||
version: '@info.app.version@' | ||
grailsVersion: '@info.app.grailsVersion@' | ||
--- | ||
grails: | ||
mime: | ||
disable: | ||
accept: | ||
header: | ||
userAgents: | ||
- Gecko | ||
- WebKit | ||
- Presto | ||
- Trident | ||
types: | ||
json: | ||
- application/json | ||
- text/json | ||
hal: | ||
- application/hal+json | ||
- application/hal+xml | ||
xml: | ||
- text/xml | ||
- application/xml | ||
atom: application/atom+xml | ||
css: text/css | ||
csv: text/csv | ||
js: text/javascript | ||
rss: application/rss+xml | ||
text: text/plain | ||
all: '*/*' | ||
urlmapping: | ||
cache: | ||
maxsize: 1000 | ||
controllers: | ||
defaultScope: singleton | ||
converters: | ||
encoding: UTF-8 | ||
|
||
profile: rest-api | ||
codegen: | ||
defaultPackage: example | ||
mime: | ||
disable: | ||
accept: | ||
header: | ||
userAgents: | ||
- Gecko | ||
- WebKit | ||
- Presto | ||
- Trident | ||
types: | ||
json: | ||
- application/json | ||
- text/json | ||
hal: | ||
- application/hal+json | ||
- application/hal+xml | ||
xml: | ||
- text/xml | ||
- application/xml | ||
atom: application/atom+xml | ||
css: text/css | ||
csv: text/csv | ||
js: text/javascript | ||
rss: application/rss+xml | ||
text: text/plain | ||
all: '*/*' | ||
urlmapping: | ||
cache: | ||
maxsize: 1000 | ||
converters: | ||
encoding: UTF-8 | ||
--- | ||
hibernate: | ||
cache: | ||
queries: false | ||
use_second_level_cache: false | ||
use_query_cache: false | ||
cache: | ||
queries: false | ||
use_second_level_cache: false | ||
use_query_cache: false | ||
dataSource: | ||
pooled: true | ||
jmxExport: true | ||
driverClassName: org.h2.Driver | ||
username: sa | ||
password: '' | ||
pooled: true | ||
driverClassName: org.h2.Driver | ||
username: sa | ||
password: '' | ||
|
||
environments: | ||
development: | ||
dataSource: | ||
dbCreate: create-drop | ||
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE | ||
test: | ||
dataSource: | ||
dbCreate: update | ||
url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE | ||
production: | ||
dataSource: | ||
dbCreate: none | ||
url: jdbc:h2:./prodDb;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 | ||
development: | ||
dataSource: | ||
dbCreate: create-drop | ||
url: jdbc:h2:mem:devDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE | ||
test: | ||
dataSource: | ||
dbCreate: update | ||
url: jdbc:h2:mem:testDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE | ||
production: | ||
dataSource: | ||
dbCreate: none | ||
url: jdbc:h2:./prodDb;LOCK_TIMEOUT=10000;DB_CLOSE_ON_EXIT=FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
examples/grails-data-service/grails-app/conf/spring/resources.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
examples/grails-data-service/grails-app/domain/example/MultitenantBook.groovy
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
examples/grails-data-service/grails-app/services/example/TestService.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
examples/grails-data-service/src/integration-test/groovy/example/ServiceInjectionSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package example | ||
|
||
import grails.testing.mixin.integration.Integration | ||
import spock.lang.Issue | ||
import spock.lang.Specification | ||
|
||
@Integration | ||
class ServiceInjectionSpec extends Specification { | ||
|
||
ClassUsingAService classUsingAService | ||
|
||
@Issue('https://github.com/grails/gorm-hibernate5/issues/202') | ||
void 'data-service is injected correctly'() { | ||
when: | ||
classUsingAService.doSomethingWithTheService() | ||
|
||
then: | ||
noExceptionThrown() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
examples/grails-data-service/src/main/groovy/example/ClassUsingAService.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package example | ||
|
||
import groovy.transform.CompileStatic | ||
|
||
@CompileStatic | ||
class ClassUsingAService { | ||
|
||
TestService testService | ||
|
||
void doSomethingWithTheService() { | ||
testService.testDataService(1l) | ||
} | ||
|
||
} |
Oops, something went wrong.