Posts

Showing posts with the label Quarkus

Generate QR Code in Quarkus Application

Image
Hello everyone, today we will learn how to generate the QR Code in the Quarkus application using zxing . Technology Used: JDK 11 Quarkus 2.2.3.Final zxing library 3.3.0 Maven 3.8.1 Project Directory: Dependency management: <? xml version ="1.0" ?> < project 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" > < modelVersion >4.0.0</ modelVersion > < groupId >org.knf.dev.demo</ groupId > < artifactId >quarku-qr-code</ artifactId > < version >1.0.0-SNAPSHOT</ version > < properties > < compiler-plugin.version >3.8.1</ compiler-plugin.version > < maven.compiler.parameters >true</ maven.compiler.parameters > < maven.compiler.source >11</ maven.compiler.source > &l

CORS with Quarkus - Example

Image
Hello everyone, today we will show you how to enable CORS support in the Quarkus application at the global level. CORS Error in Web Apps: Cross-Origin Resource Sharing (CORS) is an HTTP-header based mechanism that allows a server to indicate any origins (domain, scheme, or port) other than its own from which a browser should permit loading resources. Let's learn how to enable cors in quarkus application, Quarkus comes with a CORS filter that implements the javax.servlet.Filter interface and intercepts all incoming HTTP requests. It can be enabled in the Quarkus configuration file,  application.properties: quarkus.http.cors= true quarkus.http.cors.origins= http://localhost quarkus.http.cors.methods= GET,PUT,POST quarkus.http.cors.headers= X-Custom quarkus.http.cors.exposed-headers= Content-Disposition quarkus.http.cors.access-control-max-age= 24H quarkus.http.cors.access-control-allow-credentials= true UserResource: package com.knf.dev.demo; import javax.ws.rs. GET ; import javax

JHipster: Quarkus + React + SQL Database CRUD example

Image
Hello everyone, today we will learn how to generate a  Monolithic Full-stack web application  that is a basic Employee Management Application using JHipster. Technologies used:  Quarkus, React, H2DB, Maven. User Interface What is JHispter? JHipster is an open-source application development platform to quickly generate, develop, & deploy modern web applications & microservice architectures using React or Angular and Spring Boot or Quarkus Frameworks. JHipster Quarkus Environment Setup Step 1 :  Install Java 11,  click here Step 2 : Install Node.js,  click here Step 3 : Install JHipster using the following command npm install -g generator-jhipster or yarn global add generator-jhipster or Download  the JHipster Docker image,  click here Step 4(Optional) :   Install  Maven  or  Gradle  depends on you. You normally don’t have to install anything, as JHipster will automatically install the Maven Wrapper or the Gradle Wrapper for you. If you don’t want to use those wrappers, go to the

Quarkus Export data to PDF example

Image
Hello everyone, today we will learn how to export and download the data as a PDF file in a Quarkus project. PDF  stands for the  Portable Document Format , used to exhibit documents in an electronic form independent of the software, hardware, or operating system they are viewed on. Technologies used: Quarkus 2.2.3.final iText 5.0.6 H2DB  Hibernate ORM panache Project Directory: Maven(pom.xml): A Project Object Model or POM is the fundamental unit of work in Maven. It is an XML file that contains information about the project and configuration details utilized by Maven to build the project. It contains default values for most projects. Some of the configurations that can be designated in the POM is the project dependencies, the plugins or goals that can be executed, the build profiles, and so on. Other information such as the project version, description, developers, mailing lists, and such can withal be designated. <?xml version = "1.0" ?> <project xsi:schemaLoc