Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View tnmtechnologies's full-sized avatar

mtrefcon tnmtechnologies

View GitHub Profile
<!-- plug-in configuration to put into your parent POM for avoiding any usages of
outdated log4j2 versions, some of which are subject to the RCE CVE-2021-44228
("Log4Shell"), CVE-2021-45046, and CVE-2021-45105. Make sure to check for the
latest version of log4j2 at
https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
@slinkydeveloper
slinkydeveloper / MainVerticle.java
Last active February 25, 2020 15:48
vertx-OpenAPI3-example
import io.vertx.core.AbstractVerticle;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpServer;
import io.vertx.core.http.HttpMethod;
import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.json.JsonObject;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.ext.web.RequestParameters;
import io.vertx.ext.web.RequestParameter;
import org.slf4j.Logger;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.Initialized;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
@javax.enterprise.context.ApplicationScoped
public class StartupCdiBean {
package io.dropwizard.jersey.validation;
import com.google.common.base.Joiner;
import com.google.common.base.Strings;
import io.dropwizard.jersey.errors.ErrorMessage;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ParamConverter;
@tbroyer
tbroyer / OkHttpClientEngine.java
Last active May 31, 2022 07:19
Use OkHttp as JAX-RS Client implementation with RESTEasy
/*
* Copyright 2015 Thomas Broyer
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@gordonad
gordonad / pom.xml
Created July 4, 2012 01:59
Spring Best Practices Maven Pom
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gordondickens.sample</groupId>
<artifactId>sample-parent</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@mojavelinux
mojavelinux / StartupBean.java
Created October 20, 2010 03:41
A sample CDI extension for eagerly instantiating @ApplicationScoped beans annotated @startup
@ApplicationScoped
@Startup
public class StartupBean
{
@PostConstruct
public void onStartup()
{
System.out.println("Application starting up.");
}
}