Merge branch 'dev-eatery-service' of http://host.docker.internal:9780/takahashi/backend into dev-eatery-service
Release package / release (push) Successful in 1m12s

This commit is contained in:
TakahashiNg
2026-03-23 14:47:08 +00:00
5 changed files with 55 additions and 53 deletions
+6 -3
View File
@@ -18,9 +18,11 @@
<compiler-plugin.version>3.15.0</compiler-plugin.version>
<maven.compiler.release>21</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.reporting.outputEncoding
>UTF-8</project.reporting.outputEncoding>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.group-id
>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.32.4</quarkus.platform.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.5.4</surefire-plugin.version>
@@ -96,7 +98,8 @@
<configuration>
<argLine>@{argLine}</argLine>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<java.util.logging.manager
>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
@@ -3,7 +3,6 @@ package com.drinkool;
import io.quarkus.hibernate.orm.panache.PanacheEntity;
import jakarta.persistence.Entity;
/**
* Example JPA entity defined as a Panache Entity.
* An ID field of Long type is provided, if you want to define your own ID field extends <code>PanacheEntityBase</code> instead.
@@ -25,5 +24,6 @@ import jakarta.persistence.Entity;
*/
@Entity
public class MyEntity extends PanacheEntity {
public String field;
public String field;
}
@@ -3,45 +3,46 @@ package com.drinkool;
import io.quarkus.runtime.StartupEvent;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.event.Observes;
import java.util.stream.Stream;
import org.eclipse.microprofile.reactive.messaging.Channel;
import org.eclipse.microprofile.reactive.messaging.Emitter;
import org.eclipse.microprofile.reactive.messaging.Incoming;
import org.eclipse.microprofile.reactive.messaging.Outgoing;
import java.util.stream.Stream;
@ApplicationScoped
public class MyMessagingApplication {
/**
* Injects an emitter to send messages to the "words-out" channel.
*/
@Channel("words-out")
Emitter<String> emitter;
/**
* Injects an emitter to send messages to the "words-out" channel.
*/
@Channel("words-out")
Emitter<String> emitter;
/**
* Sends message to the "words-out" channel, can be used from a JAX-RS resource or any bean of your application.
* Messages are sent to the broker.
**/
void onStart(@Observes StartupEvent ev) {
Stream.of("Hello", "with", "Quarkus", "Messaging", "message").forEach(string -> emitter.send(string));
}
/**
* Sends message to the "words-out" channel, can be used from a JAX-RS resource or any bean of your application.
* Messages are sent to the broker.
**/
void onStart(@Observes StartupEvent ev) {
Stream.of("Hello", "with", "Quarkus", "Messaging", "message").forEach(
string -> emitter.send(string)
);
}
/**
* Consume the message from the "words-in" channel, uppercase it and send it to the uppercase channel.
* This method is called by the framework when a message is received on the "words-in" channel (from the broker).
**/
@Incoming("words-in")
@Outgoing("uppercase")
public String toUpperCase(String message) {
return message.toUpperCase();
}
/**
* Consume the message from the "words-in" channel, uppercase it and send it to the uppercase channel.
* This method is called by the framework when a message is received on the "words-in" channel (from the broker).
**/
@Incoming("words-in")
@Outgoing("uppercase")
public String toUpperCase(String message) {
return message.toUpperCase();
}
/**
* Consume the uppercase channel (coming from within the application) and print the messages to the console.
**/
@Incoming("uppercase")
public void sink(String word) {
System.out.println(">> " + word);
}
/**
* Consume the uppercase channel (coming from within the application) and print the messages to the console.
**/
@Incoming("uppercase")
public void sink(String word) {
System.out.println(">> " + word);
}
}
@@ -1,22 +1,20 @@
package com.drinkool;
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;
import jakarta.inject.Inject;
import static org.junit.jupiter.api.Assertions.assertEquals;
import io.quarkus.test.junit.QuarkusTest;
import jakarta.inject.Inject;
import org.junit.jupiter.api.Test;
@QuarkusTest
class MyMessagingApplicationTest {
@Inject
MyMessagingApplication application;
@Inject
MyMessagingApplication application;
@Test
void test() {
assertEquals("HELLO", application.toUpperCase("Hello"));
assertEquals("BONJOUR", application.toUpperCase("bonjour"));
}
@Test
void test() {
assertEquals("HELLO", application.toUpperCase("Hello"));
assertEquals("BONJOUR", application.toUpperCase("bonjour"));
}
}
+5 -5
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>4.0.0</modelVersion>
@@ -45,4 +45,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>