All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ap4k.micronaut.MicronautWebAnnotationGenerator Maven / Gradle / Ivy

There is a newer version: 0.5.0
Show newest version
package io.ap4k.micronaut;

import io.ap4k.WithSession;
import io.ap4k.Generator;
import io.ap4k.kubernetes.config.Port;
import io.ap4k.kubernetes.config.PortBuilder;
import io.ap4k.kubernetes.configurator.AddPort;

import java.util.Collections;
import java.util.Map;

public interface MicronautWebAnnotationGenerator extends Generator, WithSession {

  Map WEB_ANNOTATIONS=Collections.emptyMap();

  @Override
  default void add(Map map) {
    Port port = detectHttpPort();
    session.configurators().add(new AddPort(port));
  }

  default Port detectHttpPort()  {
    return new PortBuilder().withContainerPort(8080).withName("http").build();
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy