-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSampleSpringBootService.java
38 lines (31 loc) · 1.45 KB
/
SampleSpringBootService.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package io.hawt.example.spring.boot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import io.hawt.springboot.HawtioPlugin;
@SpringBootApplication
public class SampleSpringBootService {
public static void main(String[] args) {
SpringApplication.run(SampleSpringBootService.class, args);
}
@Bean
public HawtioPlugin samplePlugin() {
/*
* These are the parameters required to load a remote Hawtio plugin (a.k.a. Module Federation remote module):
*
* - scope: The name of the container defined at Webpack ModuleFederationPlugin. See also: sample-plugin/craco.config.js
* - module: The path exposed from Webpack ModuleFederationPlugin. See also: sample-plugin/craco.config.js
* - url: The URL of the remote entry for the plugin, e.g. "http://localhost:8081". (optional)
*/
HawtioPlugin plugin = new HawtioPlugin(
"samplePlugin",
"./plugin");
/*
* By default, Hawtio expects "plugin" as the name of the Hawtio plugin entry function.
* If you want to use the name other than the default one, specify the name using HawtioPlugin#setPluginEntry()
* as follows. See also: sample-plugin/src/sample-plugin/index.ts
*/
//plugin.setPluginEntry("registerMyPlugin");
return plugin;
}
}