Skip to content

Commit

Permalink
Merge pull request #1 from joon6093/1.0.x
Browse files Browse the repository at this point in the history
Release v1.0.0
  • Loading branch information
joon6093 authored Nov 22, 2024
2 parents 5feb674 + b84f071 commit 92fef5d
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 54 deletions.
28 changes: 0 additions & 28 deletions build.gradle

This file was deleted.

26 changes: 20 additions & 6 deletions handler/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6'
id 'org.springframework.boot' version '3.0.0' apply false
id 'maven-publish'
}

group = 'io.jeyong'
version = '0.0.1-SNAPSHOT'
version = '1.0.0'

ext {
artifactName = 'k8s-sigterm-handler'
}

java {
toolchain {
Expand All @@ -15,14 +19,24 @@ java {

repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation 'org.springframework.boot:spring-boot-starter:3.0.0'
}

tasks.named('test') {
useJUnitPlatform()
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
groupId = project.group
artifactId = project.ext.artifactName
version = project.version
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ public class HandlerApplication {
public static void main(String[] args) {
SpringApplication.run(HandlerApplication.class, args);
}

}
17 changes: 17 additions & 0 deletions handler/src/main/java/io/jeyong/handler/SigtermListener.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package io.jeyong.handler;

import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import sun.misc.Signal;

public class SigtermListener implements ApplicationListener<ApplicationReadyEvent> {

@Override
public void onApplicationEvent(ApplicationReadyEvent event) {
Signal.handle(new Signal("TERM"), signal -> handleSigterm());
}

private void handleSigterm() {
System.exit(0);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.jeyong.handler.SigtermListener
1 change: 0 additions & 1 deletion handler/src/main/resources/application.properties

This file was deleted.

This file was deleted.

10 changes: 7 additions & 3 deletions test/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6'
id 'org.springframework.boot' version '3.0.0'
id 'io.spring.dependency-management' version '1.1.0'
}

group = 'io.jeyong'
Expand All @@ -18,7 +18,11 @@ repositories {
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation project(':handler')
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
Expand Down
1 change: 0 additions & 1 deletion test/src/main/java/io/jeyong/test/TestApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ public class TestApplication {
public static void main(String[] args) {
SpringApplication.run(TestApplication.class, args);
}

}
1 change: 0 additions & 1 deletion test/src/main/resources/application.properties

This file was deleted.

Empty file.

0 comments on commit 92fef5d

Please sign in to comment.