You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-13Lines changed: 72 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,55 @@
1
1
# Grails Dynamic Modules Plugin
2
2
3
3
Grails Dynamic Modules Plugin (GDMP) offer new ways of creating modular and maintainable Grails applications.
4
+
4
5
A Grails plugin can implement one or more plugin modules to develop and extend Grails applications.
5
6
We can use Dynamic Modules to maximize the use of Grails plugins and create an open, shared, and reusable plugin market.
6
-
Welcome to contribute more types of modules, as well as plugins for these modules.
7
+
8
+
I will provide more Module Types in later releases, and also welcome to contribute more types of modules, as well as plugins for these modules.
7
9
8
10
## Grails Version
9
11
10
12
- Grails **4.1.2**
11
13
12
14
## Usage
13
15
14
-
Add dependency to the `build.gradle`,
16
+
This plugin has been released to [Maven Central](https://central.sonatype.com/artifact/org.rainboyan.plugins/grails-plugin-dynamic-modules).
17
+
18
+
Since this plugin is for building multiple modules, I highly recommend that you read this guide [Grails Multi-Project Build](https://guides.grails.org/grails-multi-project-build/guide/index.html) first.
19
+
20
+
21
+
```bash
22
+
.
23
+
├── gradle
24
+
│ └── wrapper
25
+
├── grails-app
26
+
│ ├── assets
27
+
│ ├── conf
28
+
│ ├── controllers
29
+
│ ├── domain
30
+
│ ├── i18n
31
+
│ ├── init
32
+
│ ├── services
33
+
│ ├── taglib
34
+
│ ├── utils
35
+
│ └── views
36
+
├── plugins
37
+
│ └── menu
38
+
├── src
39
+
│ ├── integration-test
40
+
│ ├── main
41
+
│ └── test
42
+
├── build.gradle
43
+
├── gradle.properties
44
+
├── gradlew
45
+
├── gradlew.bat
46
+
├── grails-wrapper.jar
47
+
├── grailsw
48
+
├── grailsw.bat
49
+
└── settings.gradle
50
+
```
51
+
52
+
First, you should add the dependency to your app `build.gradle`,
I've created a sample Grails project([Grails Dynamic Modules Demo](https://github.com/rainboyan/grails-dynamic-modules-demo)) that you can run it and learn more.
134
+
I've written a demo app for you that you can clone to your local computer, run it, and go through the code to learn more.
@@ -109,6 +149,7 @@ cd grails-plugin-dynamic-modules
109
149
110
150
* Grails 4.0, 4.1
111
151
* Grails 5.0, 5.1, 5.2, 5.3
152
+
* Grails 6.0
112
153
113
154
## Known issues
114
155
@@ -134,6 +175,23 @@ this is because the Closure doWithSpring's delegation strategy was not set, `Clo
134
175
135
176
```
136
177
178
+
Although 6 months have passed and the [PR#12892](https://github.com/grails/grails-core/pull/12892) for this issue has not been merged [grails-core](https://github.com/grails/grails-core), there is still a way to solve this problem.
179
+
180
+
That is to use [Java-based Container Configuration](https://docs.spring.io/spring-framework/reference/core/beans/java.html) instead of Grails `Plugin.doWithSpring()`.
181
+
182
+
```java
183
+
@Configuration(proxyBeanMethods=false)
184
+
publicclassMenuModuleAutoConfiguration {
185
+
186
+
@Bean
187
+
@ConditionalOnMissingBean
188
+
publicWebMenuManagerwebMenuManager() {
189
+
returnnewDefaultWebMenuManager();
190
+
}
191
+
192
+
}
193
+
```
194
+
137
195
## License
138
196
139
197
This plugin is available as open source under the terms of the [APACHE LICENSE, VERSION 2.0](http://apache.org/Licenses/LICENSE-2.0)
@@ -148,3 +206,4 @@ This plugin is available as open source under the terms of the [APACHE LICENSE,
0 commit comments