systemd-spring-boot

Systemd/watchdog integration for Spring Boot

License

License

Categories

Categories

Spring Boot Container Microservices
GroupId

GroupId

com.github.dpimkin.systemd
ArtifactId

ArtifactId

systemd-spring-boot
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

pom
Description

Description

systemd-spring-boot
Systemd/watchdog integration for Spring Boot
Project URL

Project URL

https://github.com/dpimkin/systemd-spring-boot-starter
Source Code Management

Source Code Management

https://github.com/dpimkin/systemd-spring-boot-starter

Download systemd-spring-boot

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.dpimkin.systemd/systemd-spring-boot/ -->
<dependency>
    <groupId>com.github.dpimkin.systemd</groupId>
    <artifactId>systemd-spring-boot</artifactId>
    <version>0.0.1</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.dpimkin.systemd/systemd-spring-boot/
implementation 'com.github.dpimkin.systemd:systemd-spring-boot:0.0.1'
// https://jarcasting.com/artifacts/com.github.dpimkin.systemd/systemd-spring-boot/
implementation ("com.github.dpimkin.systemd:systemd-spring-boot:0.0.1")
'com.github.dpimkin.systemd:systemd-spring-boot:pom:0.0.1'
<dependency org="com.github.dpimkin.systemd" name="systemd-spring-boot" rev="0.0.1">
  <artifact name="systemd-spring-boot" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.github.dpimkin.systemd', module='systemd-spring-boot', version='0.0.1')
)
libraryDependencies += "com.github.dpimkin.systemd" % "systemd-spring-boot" % "0.0.1"
[com.github.dpimkin.systemd/systemd-spring-boot "0.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • autoconfigure
  • starter
  • examples

How to integrate Systemd/Watchdog support

TL;DR

Add dependency

        <dependency>
            <groupId>com.github.dpimkin.systemd</groupId>
            <artifactId>systemd-spring-boot-starter</artifactId>
            <version>0.0.1</version>
        </dependency>

Adjust watchdog period in application.properties (optional).

systemd.watchdog.delay=2000

Unit file example

[Unit]
Description=simple watchdog
After=syslog.target

[Service]
WorkingDirectory=/usr/local/share/simple-watchdog
SyslogIdentifier=johndoe
ExecStart=/bin/bash -c "/path/to/jdk/bin/java -jar /usr/local/share/simple-watchdog/simple-watchdog.jar"
User=johndoe
Type=simple
WatchdogSec=30s
Restart=always

[Install]
WantedBy=multi-user.target

Versions

Version
0.0.1