Posts

Showing posts with the label Micronaut

Micronaut REST Exception Handling - Global

Image
Hello everyone, today we will learn how to handle exceptions in the Micronaut REST application using ExceptionHandler . You can download the source code from our Github Repository. Project Directory: Pom.xml: <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion> 4.0.0 </modelVersion> <groupId> com.knf.dev.demo </groupId> <artifactId> micronaut-global-exception-handling </artifactId> <version> 0.1 </version> <packaging> ${packaging} </packaging> <parent> <groupId> io.micronaut </groupId> <artifactId> micronaut-parent </artifactId> <version> 3.1.3 </version> </pa

JHipster: Micronaut + Angular + 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:  Micronaut, Angular, H2DB, Maven. User Interface JHipster is an open-source application development platform to quickly generate, develop, & deploy modern web applications & microservice architectures using Angular or React or Vue and Spring Boot or Micronaut Frameworks. Micronaut is a modern, JVM-predicated, full-stack Java framework designed for building modular, facilely testable JVM applications with support for Java, Kotlin and the Groovy language. JHipster Micronaut 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@6.10.5 or yarn global add generator-jhipster@6.10.5 or Download  the JHipster Docker image,  click here Step 4(Optional) :  Install  Maven  or  Gradle  d

Micronaut Caffeine Cache - Quick Start

Image
Hello everyone, Today we will setup up a sample Micronaut application and integrate it with Caffeine Cache. Caffeine is a high-performance Java-based caching library providing a near-optimal hit rate. It provides an in-memory cache. Final Project Directory Maven Dependencies <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion> 4.0.0 </modelVersion> <groupId> com.knf.dev.demo </groupId> <artifactId> micronaut-caffeine-demo </artifactId> <version> 0.1 </version> <packaging> ${packaging} </packaging> <parent> <groupId> io.micronaut </groupId> <artifactId> micronaut-parent </artifactId>