Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

<artifactId>spring-cloud-kubernetes-k8s-client-discovery-server</artifactId>

<properties>
<spring-boot.repackage.skip>true</spring-boot.repackage.skip>
<spring-boot.build-image.skip>true</spring-boot.build-image.skip>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -43,10 +48,6 @@
<directory>../src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.springframework.cloud.kubernetes.discoveryclient.it;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
* @author wind57
*/
@SpringBootApplication
@EnableScheduling
public class App {

public static void main(String[] args) {
SpringApplication.run(App.class, args);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ class HeartbeatListener implements ApplicationListener<HeartbeatEvent> {

private static final LogAccessor LOG = new LogAccessor(LogFactory.getLog(HeartbeatListener.class));

AtomicReference<List<EndpointNameAndNamespace>> state = new AtomicReference<>(List.of());
public final AtomicReference<List<EndpointNameAndNamespace>> state = new AtomicReference<>(List.of());

@Override
@SuppressWarnings("unchecked")
public void onApplicationEvent(HeartbeatEvent event) {
LOG.info("received heartbeat event");
LOG.info("received heartbeat event in listener");
List<EndpointNameAndNamespace> state = (List<EndpointNameAndNamespace>) event.getValue();
this.state.set(state);
LOG.info("state received : " + state);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading