Skip to content

Instantly share code, notes, and snippets.

@edbrook
edbrook / pom.xml
Last active March 16, 2024 22:39
Fix netty-resolver error on Mac aarch64
<?xml version="1.0" encoding="UTF-8"?>
<project>
<!-- ... other project settings ... -->
<profiles>
<profile>
<id>macosx_arm</id>
<activation>
<os>
@edbrook
edbrook / Dockerfile
Created February 22, 2024 16:02
Amazon Corretto 21 + maven
FROM amazoncorretto:21-al2023-headless
RUN yum install -y tar
RUN curl -o maven.tgz https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz \
&& tar -C /opt -zxf maven.tgz \
&& ln -s /opt/apache-maven-3.9.6/bin/mvn /usr/bin/mvn \
&& rm -f maven.tgz
RUN yum remove -y tar
@edbrook
edbrook / cors-webflux.md
Last active February 22, 2024 16:24
CORS Example - WebFlux

CORS Configuration

CorsConfigurationSource

To configure globally, annotate with @Bean.

CorsConfigurationSource corsConfig() {
    CorsConfiguration configuration = new CorsConfiguration();
    configuration.setAllowedOrigins(List.of(
@edbrook
edbrook / maven_vue_spring-boot.md
Last active February 22, 2024 16:26
Spring-Boot embedded Vue.js app

Spring-Boot embedded Vue.js app

Build & embed a vite / vue.js app into spring-boot service using maven.

Create Vue.js app

mkdir -p src/main/vue/project_name
cd src/main/vue/project_name
npm create vite@latest

Consuming SOAP Web Services

Dependencies

<dependency>
    <groupId>com.sun.xml.ws</groupId>
    <artifactId>rt</artifactId>
    <version>2.3.3</version>

XML Processing JAXB

JAXB Dependency

<dependency>
    <groupId>org.glassfish.jaxb</groupId>
    <artifactId>jaxb-runtime</artifactId>
    <version>2.3.3</version>
</dependency>
@edbrook
edbrook / css_grid_layout.html
Last active August 4, 2020 13:14
Create fixed head & scrollable body using CSS `display: grid`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Layout</title>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
}