Java
statically-typed
memory safe
compiled into bytecode, then it is run on JVM (Java Virtual Machine)
heap dump can be captured automatically or manually
“A JKS file is an encrypted security file used to store a set of cryptographic keys or certificates in the binary Java KeyStore (JKS) format. It requires a password to be opened. Developers use JKS files for a variety of security-related purposes.”
POJO approach Plain Old Java Object
Java Archive (JAR)
Java Development Kit (JDK)
Maven
https://adoptium.net/
Core Features
data types variables operators control structures (loops, conditionals)
hashmap.forEach((key, value) -> logger.info());
java.lang java.util java.io
static on something means that something belongs to the class rathar than any object
- a static object belongs to all instances of a class
- a static method can be used without creating an instance of the class
- a static block is code that will be executed as soon as the class is loaded into JVM
public class StaticClass {
static {
}
}
To see what’s in the file without extracting:
jar tf example.jar
OOP
classes
objects
inheritance, polymorphism, encapsulation, abstraction
Exceptions
try-catch
custom exceptions
logger.info()
WildFly
aka JBoss Application Server
Apache Groovy
Kotlin
Quarkus
follows the JAX-RS (Java API for REST services)
typically:
- resource file, endpoints, etc. annotated with @Path, @Produces, @Consumes
- service file
- response file, DTO (Data Transfer Objects)
quarkus create app org.acme:getting-started \
--extension='resteasy-reactive'
cd getting-started
https://central.sonatype.com/artifact/software.amazon.awssdk/cognitoidentityprovider
https://docs.quarkiverse.io/quarkus-amazon-services/dev/amazon-cognitouserpools.html
quarkus ext add io.quarkiverse.amazonservices:quarkus-amazon-cognito-user-pools
pom.xml
application.properties
Handling null
uni
.onItem().ifNotNull().transform(String::toUpperCase)
pathparam vs queryparam
@PathParam
is used to extract a variable part of the URI, while @QueryParam
is used to extract values from query parameters in the URI.
@PathParam
will navigate to something like: /example/pathparam/Sif
@QueryParam
will navigate to something like: /example/queryparam?name=Sif
Versions
<quarkus.platform.version> </quarkus.platform.version>
3.2.9Final (LTS)
3.3+ provides SSL support
3.6.1
Scala
Versions
java
]