feat(actuator) : add actuator on spring application
This commit is contained in:
parent
ee5df805ac
commit
eb017727ed
7 changed files with 35 additions and 2 deletions
|
|
@ -49,6 +49,11 @@
|
|||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
|
@ -139,6 +144,10 @@
|
|||
<artifactId>spring-boot</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.uberfire</groupId>
|
||||
<artifactId>uberfire-rest-client</artifactId>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package org.chtijbug.drools.console;
|
||||
|
||||
|
||||
import com.vaadin.flow.spring.SpringServlet;
|
||||
import org.apache.kafka.clients.admin.AdminClientConfig;
|
||||
import org.apache.kafka.clients.admin.NewTopic;
|
||||
import org.apache.kafka.clients.consumer.ConsumerConfig;
|
||||
|
|
@ -23,7 +24,9 @@ import org.springframework.boot.SpringApplication;
|
|||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
|
|
@ -168,6 +171,11 @@ public class DroolsSpringBootConsoleApplication extends SpringBootServletInitial
|
|||
return factory;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ServletRegistrationBean<SpringServlet> springServlet(ApplicationContext context) {
|
||||
return new ServletRegistrationBean<>(new SpringServlet(context), "/admin/*", "/frontend/*");
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DroolsSpringBootConsoleApplication.class, args);
|
||||
|
|
|
|||
|
|
@ -17,3 +17,6 @@ spring.data.mongodb.username=${PYMMA_MONGO_USERNAME}
|
|||
|
||||
spring.servlet.multipart.enabled=false
|
||||
kafka.bootstrapAddress=${PYMMA_KAFKA_BOOTSTRAP:localhost:9092,localhost:9093,localhost:9094}
|
||||
|
||||
vaadin.urlMapping=/admin/*
|
||||
server.servlet.context-path=/
|
||||
Loading…
Add table
editor.link_modal.header
Reference in a new issue