Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update quarkus version 2.9.1.Final -> 3.4.3 #12

Merged
merged 5 commits into from
Oct 24, 2023
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
2 changes: 1 addition & 1 deletion code/exercise_000_initial_state/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<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.version>2.9.1.Final</quarkus.platform.version>
<quarkus.platform.version>3.4.3</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
</properties>
<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.lunatech.training.quarkus;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/hello")
public class GreetingResource {
Expand Down
2 changes: 1 addition & 1 deletion code/exercise_001_create_a_greeting_service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<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.version>2.9.1.Final</quarkus.platform.version>
<quarkus.platform.version>3.4.3</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
</properties>
<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.lunatech.training.quarkus;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/hello")
public class GreetingResource {
Expand Down
2 changes: 1 addition & 1 deletion code/exercise_002_a_qute_hello_world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can create one yourself, or fetch on by executing the following command from

<code repo root folder> is the root folder of your exercise repository.

* Inject a `io.quarkus.qute.Template` field with name `greet` using a `javax.inject.Inject` annotation. Quarkus will look for a template with that name, and automatically generate the `Template` object for you!
* Inject a `io.quarkus.qute.Template` field with name `greet` using a `jakarta.inject.Inject` annotation. Quarkus will look for a template with that name, and automatically generate the `Template` object for you!
* Make your hello endpoint return `greet.instance()`
* Check http://localhost:8080/hello/world to see if it works :)
* Now, change your template to use an expression `{subject}` instead of the hardcoded `World`, and change your resource to supply the subject parameter to the template.
Expand Down
2 changes: 1 addition & 1 deletion code/exercise_002_a_qute_hello_world/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<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.version>2.9.1.Final</quarkus.platform.version>
<quarkus.platform.version>3.4.3</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
</properties>
<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import io.quarkus.qute.Template;
import io.quarkus.qute.TemplateInstance;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/hello")
public class GreetingResource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;

import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MediaType;

import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
Expand Down
2 changes: 1 addition & 1 deletion code/exercise_003_qute_products/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<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.version>2.9.1.Final</quarkus.platform.version>
<quarkus.platform.version>3.4.3</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
</properties>
<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import io.quarkus.qute.Template;
import io.quarkus.qute.TemplateInstance;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/hello")
public class GreetingResource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import io.quarkus.qute.Template;
import io.quarkus.qute.TemplateInstance;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.NotFoundException;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;

@Path("/products")
public class ProductsResource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;

import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MediaType;

import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
Expand Down
2 changes: 1 addition & 1 deletion code/exercise_004_even_qute_products/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<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.version>2.9.1.Final</quarkus.platform.version>
<quarkus.platform.version>3.4.3</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
</properties>
<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import io.quarkus.qute.Template;
import io.quarkus.qute.TemplateInstance;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/hello")
public class GreetingResource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import io.quarkus.qute.Template;
import io.quarkus.qute.TemplateInstance;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.NotFoundException;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;

@Path("/products")
public class ProductsResource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;

import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MediaType;

import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
Expand Down
2 changes: 1 addition & 1 deletion code/exercise_005_products_from_the_database/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<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.version>2.9.1.Final</quarkus.platform.version>
<quarkus.platform.version>3.4.3</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
</properties>
<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import io.quarkus.qute.Template;
import io.quarkus.qute.TemplateInstance;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/hello")
public class GreetingResource {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
package com.lunatech.training.quarkus;

import io.quarkus.hibernate.orm.panache.PanacheEntity;
import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;

import javax.persistence.Entity;
import java.math.BigDecimal;

@Entity
public class Product extends PanacheEntity {
public class Product extends PanacheEntityBase {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long id;
public String name;
public String description;
public BigDecimal price;

public Product(){}
public Product() {}

public Product(Long id, String name, String description, BigDecimal price) {
this.id = id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import io.quarkus.qute.TemplateInstance;
import io.smallrye.common.annotation.Blocking;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.NotFoundException;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;

@Path("/products")
public class ProductsResource {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Carpet', 'Soft carpet', 39.95);
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import io.quarkus.test.junit.QuarkusTest;
import org.junit.jupiter.api.Test;

import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.core.MediaType;

import static io.restassured.RestAssured.given;
import static org.hamcrest.CoreMatchers.is;
Expand Down
2 changes: 1 addition & 1 deletion code/exercise_006_CDI_and_ArC/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<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.version>2.9.1.Final</quarkus.platform.version>
<quarkus.platform.version>3.4.3</quarkus.platform.version>
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
</properties>
<dependencyManagement>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import io.quarkus.runtime.StartupEvent;
import org.eclipse.microprofile.config.inject.ConfigProperty;

import javax.enterprise.event.Observes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.enterprise.event.Observes;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/hello")
public class GreetingResource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@

import io.quarkus.hibernate.orm.panache.PanacheEntity;

import javax.persistence.Entity;
import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;

import java.math.BigDecimal;

@Entity
public class Product extends PanacheEntity {
public class Product extends PanacheEntityBase {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
public Long id;
public String name;
public String description;
public BigDecimal price;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import io.quarkus.qute.TemplateInstance;
import io.smallrye.common.annotation.Blocking;

import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.NotFoundException;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;

@Path("/products")
public class ProductsResource {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.lunatech.training.quarkus;

import javax.enterprise.context.RequestScoped;
import jakarta.enterprise.context.RequestScoped;

@RequestScoped
public class SubjectBean {
Expand Down
14 changes: 7 additions & 7 deletions code/exercise_006_CDI_and_ArC/src/main/resources/import.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (nextval('hibernate_sequence'), 'Carpet', 'Soft carpet', 39.95);
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
Loading
Loading