-
Notifications
You must be signed in to change notification settings - Fork 71
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
Use versions from grails-bom
in example apps
#920
base: 9.0.x
Are you sure you want to change the base?
Conversation
862c985
to
b9b5d11
Compare
6fc1e46
to
218d480
Compare
bc85678
to
7c1506e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matrei have you tried running all these examples to see if they work as expected?
Do you know why @EnableAutoConfiguration(exclude = DataSourceTransactionManagerAutoConfiguration)
was there and commented out and if it still needs to be excluded. It can be excluded in application.yml if necessary.
Yes
This was probably to prevent Spring Boot from configuring a transaction manager as GORM also does this and there is a problem when two are configured. It seems this is not needed anymore when using the I actually had to add something like that to |
And remove unused versions from `gradle.properties`
As `ContainerGebSpec` is used now, `webdriver-binaries-gradle-plugin` can be removed.
- `AnotherBookService`: Make `save()` method use passed book title - `Application`: Remove unused imports and old comment - `application.yml`: Format properly with 2 spaces and group config settings better - `logback.xml`: Correct faulty pattern - `build.gradle`: Use correct dependencies and narrow the scopes. Apply Gradle plugins in subproject instead of having logic and conditions in the root build file apply them - much easier to see what's being applied.
- `application.yml`: Format properly with 2 spaces and group config settings better. Remove unused config. - `logback.xml`: Correct faulty pattern - `build.gradle`: Use correct dependencies and narrow the scopes. Switch from `tomcat-jdbc` to `HikariCP` as this will be the new default. Apply Gradle plugins in subproject instead of having logic and conditions in the root build file apply them - much easier to see what's being applied. - `BookControllerUnitSpec`: Remove unused imports and bean definition of deprecated `MimeTypesGrailsPlugin`. - `UrlMappings`: Move to package so it is pickup up.
- `application.yml`: Format properly with 2 spaces and group config settings better. Remove unused config. - `logback.xml`: Correct faulty pattern - `Application`: Remove unused imports and old comment - `build.gradle`: Use correct dependencies and narrow the scopes. Switch from `tomcat-jdbc` to `HikariCP` as this will be the new default. Apply Gradle plugins in subproject instead of having logic and conditions in the root build file apply them - much easier to see what's being applied. Use `astTransformation` configuration for dependencies that needs to be both `compileOnly` and `integrationTestCompileOnly`.
- `application.yml`: Format properly with 2 spaces and group config settings better. Remove unused config. - `logback.xml`: Correct faulty pattern - `AnotherBookService`: Make `save()` method use passed book title - `PartionedMultiTenancySpec`: Remove unused imports - `Application`: Remove unused imports and old comment - `build.gradle`: Use correct dependencies and narrow the scopes. Switch from `tomcat-jdbc` to `HikariCP` as this will be the new default. Apply Gradle plugins in subproject instead of having logic and conditions in the root build file apply them - much easier to see what's being applied.
- `application.yml`: Format properly with 2 spaces and group config settings better. Remove unused config. - `logback.xml`: Correct faulty pattern - `AnotherBookService`: Make `save()` method use passed book title - `SchemaPerTenantSpec`: Remove unused imports - `Application`: Remove unused imports and old comment - `build.gradle`: Use correct dependencies and narrow the scopes. Switch from `tomcat-jdbc` to `HikariCP` as this will be the new default. Apply Gradle plugins in subproject instead of having logic and conditions in the root build file apply them - much easier to see what's being applied.
- `application.yml`: Format properly with 2 spaces and group config settings better. Remove unused config. - `logback.xml`: Correct faulty pattern - `Customer`: Add no-args constructor needed for proxying - `ProxySpec`: Remove unused imports - `Application`: Remove unused imports and old comment - `build.gradle`: Use correct dependencies and narrow the scopes. Switch from `tomcat-jdbc` to `HikariCP` as this will be the new default. Apply Gradle plugins in subproject instead of having logic and conditions in the root build file apply them - much easier to see what's being applied. Change version variable name from `hibernateGroovyProxy` to `yakworksHibernateGroovyProxyVersion`.
- `application.yml`: Format properly with 2 spaces remove unused config. - `Application`: Exclude `HibernateJpaAutoConfiguration` to avoid duplicate transaction managers: java.lang.ClassCastException: class org.springframework.orm.jpa.EntityManagerHolder cannot be cast to class org.springframework.orm.hibernate5.SessionHolder (org.springframework.orm.jpa.EntityManagerHolder and org.springframework.orm.hibernate5.SessionHolder are in unnamed module of loader 'app') - `BookController`: Add `@ReadOnly` to `books()` action to get a session for the `Book.list()` method. - `build.gradle`: Use correct dependencies and narrow the scopes. Switch from `tomcat-jdbc` to `HikariCP` as this will be the new default. Apply Gradle plugins in subproject instead of having logic and conditions in the root build file apply them - much easier to see what's being applied. Add version variable `springBootGradlePluginVersion`.
7c1506e
to
e6882c6
Compare
The fix for #450 did not really fit in `examples-grails-data-service`. This commit adds a new example project, that shows the problem and that it now works (taken from https://github.com/grails-core-issues-forks/multitenantcomposite).
- `MultitenantBook.groovy`: Remove as extracted to examples-issue-450 - `application.yml`: Format properly with 2 spaces and group config settings better. Remove unused config. - `ClassUsingAService`: Remove dependency on `grails-spring-security-rest`. No need to depend on outside plugins for this test. New test `ServiceInjectionSpec` exercising issue 202. - `TestService`: Remove unused `transactionService` property - `logback.xml`: Correct faulty pattern
Use correct dependencies and narrow the scopes. Switch from `tomcat-jdbc` to `HikariCP` as this will be the new default. Apply Gradle plugins in subproject instead of having logic and conditions in the root build file apply them - much easier to see what's being applied.
The correct behavior I am finding is to not have to use these at all and to reconfigure the plugins to work with the AutoConfigurations. In most cases the AutoConfigurations do 2x the work because what happens is the AutoConfigurations run first, create the service and then Grails creates the same service with the same name. This is terribly inefficient. The best fixes in these scenarios are to create the bean definition before the Autoconfiguration. When not possible, you can also create a javaconfig for a null placeholder definition so that it stops the AutoConfiguration as well. These issues are usually masked due to bean definition overriding. enabled by default |
And remove unused versions from
gradle.properties