File tree Expand file tree Collapse file tree 5 files changed +55
-15
lines changed
lowcoder-domain/src/main/java/org/lowcoder/domain/configurations
lowcoder-sdk/src/main/java/org/lowcoder/sdk/config
src/main/java/org/lowcoder/api/framework Expand file tree Collapse file tree 5 files changed +55
-15
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ public class CommonConfig {
44
44
private Cookie cookie = new Cookie ();
45
45
private JsExecutor jsExecutor = new JsExecutor ();
46
46
private Set <String > disallowedHosts = new HashSet <>();
47
+ private List <String > pluginDirs = new ArrayList <>();
47
48
48
49
public boolean isSelfHost () {
49
50
return !isCloud ();
Original file line number Diff line number Diff line change 35
35
<artifactId >lowcoder-domain</artifactId >
36
36
</dependency >
37
37
38
+ <dependency >
39
+ <groupId >org.lowcoder.plugin</groupId >
40
+ <artifactId >lowcoder-plugin-api</artifactId >
41
+ <version >2.0.0</version >
42
+ </dependency >
43
+
38
44
<dependency >
39
45
<groupId >org.springframework.boot</groupId >
40
46
<artifactId >spring-boot-starter-security</artifactId >
Original file line number Diff line number Diff line change 1
1
package org .lowcoder .api .framework .configuration ;
2
2
3
+ import org .lowcoder .api .ServerApplication ;
3
4
import org .lowcoder .sdk .config .CommonConfig ;
5
+ import org .pf4j .spring .SpringPluginManager ;
4
6
import org .springframework .beans .factory .annotation .Autowired ;
7
+ import org .springframework .boot .system .ApplicationHome ;
5
8
import org .springframework .boot .web .servlet .MultipartConfigFactory ;
6
9
import org .springframework .context .annotation .Bean ;
7
10
import org .springframework .context .annotation .Configuration ;
@@ -15,6 +18,18 @@ public class ApplicationConfiguration
15
18
@ Autowired
16
19
private CommonConfig common ;
17
20
21
+ @ Bean ("applicationHome" )
22
+ public ApplicationHome applicatioHome ()
23
+ {
24
+ return new ApplicationHome (ServerApplication .class );
25
+ }
26
+
27
+ @ Bean
28
+ public SpringPluginManager pluginManager ()
29
+ {
30
+ return new SpringPluginManager ();
31
+ }
32
+
18
33
@ Bean
19
34
public MultipartConfigElement multipartConfigElement ()
20
35
{
Original file line number Diff line number Diff line change
1
+ package org .lowcoder .api .framework .plugin ;
2
+
3
+ import java .util .Map ;
4
+
5
+ import org .lowcoder .plugin .LowcoderPlugin ;
6
+ import org .lowcoder .sdk .config .CommonConfig ;
7
+ import org .springframework .boot .system .ApplicationHome ;
8
+ import org .springframework .context .ConfigurableApplicationContext ;
9
+ import org .springframework .stereotype .Component ;
10
+
11
+ import jakarta .annotation .PostConstruct ;
12
+ import lombok .RequiredArgsConstructor ;
13
+ import lombok .extern .slf4j .Slf4j ;
14
+
15
+ @ RequiredArgsConstructor
16
+ @ Component
17
+ @ Slf4j
18
+ public class LowcoderPluginManager
19
+ {
20
+ private final ConfigurableApplicationContext applicationContext ;
21
+ private final CommonConfig common ;
22
+ private final ApplicationHome applicationHome ;
23
+
24
+ private Map <String , LowcoderPlugin > plugins ;
25
+
26
+
27
+ @ PostConstruct
28
+ private void loadPlugins ()
29
+ {
30
+
31
+ }
32
+
33
+ }
You can’t perform that action at this time.
0 commit comments