Following the guide https://quarkus.io/guides/lifecycle#startup_annotation, I created a class to initialize some metadata on startup with the following class:
@Startup
@ApplicationScoped
public class AppInstance {
private final UUID id;
private static final Logger logger = LoggerFactory.getLogger(AppInstance.class);
AppInstance() {
this.id = UUID.randomUUID();
logger.info("App id: {}", this.id.toString());
}
public UUID getId() {
return id;
}
}
And when I run mvn quarkus:dev I see that the message App id: <some uuid> is logged twice.
Is this expected behaviour? If so what does this achieve?