by Josh Long
-
twitter: @starbuxman
-
email: [email protected]
-
new book: http://ReactiveSpring.io
-
podcast: http://BootifulPodcast.fm
-
code: http://github.com/joshlong/the-reactive-revolution
| #!/usr/bin/env bash | |
| PID=${1} | |
| RSS=`ps -o rss ${PID} | tail -n1` | |
| RSS=`bc <<< "scale=1; ${RSS}/1024"` | |
| echo "${PID}: ${RSS}M" |
| // run with | |
| // java DatesApplication.java | |
| import java.time.LocalDate; | |
| import java.time.temporal.ChronoUnit; | |
| import java.util.Map; | |
| public class DatesApplication { |
| /* | |
| add schema.sql | |
| create table customer | |
| ( | |
| id serial primary key, | |
| name varchar(255) not null | |
| ); | |
| add spring boot starters as usual, then add: | |
| package autoservices; | |
| import com.mongodb.reactivestreams.client.MongoClient; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.env.EnvironmentPostProcessor; | |
| import org.springframework.core.env.ConfigurableEnvironment; | |
| import org.springframework.core.env.MapPropertySource; | |
| import org.testcontainers.containers.MongoDBContainer; | |
| import org.testcontainers.lifecycle.Startables; |
| package com.example.reactive | |
| import org.reactivestreams.Publisher | |
| import org.springframework.boot.autoconfigure.SpringBootApplication | |
| import org.springframework.boot.builder.SpringApplicationBuilder | |
| import org.springframework.cloud.gateway.handler.predicate.RoutePredicates.path | |
| import org.springframework.cloud.gateway.route.gateway | |
| import org.springframework.context.support.beans | |
| import org.springframework.data.annotation.Id | |
| import org.springframework.data.mongodb.core.mapping.Document |
| #!/bin/bash | |
| START_DIR=`pwd` | |
| export OS=$( uname | tr '[:upper:]' '[:lower:]' ) | |
| export SCRIPT_DIR=$HOME/my-env | |
| export SCRIPT_DIR_BIN=$SCRIPT_DIR/bin | |
| export SCRIPT_OS_DIR=${SCRIPT_DIR}/${OS} | |
| export APP_INSTALL_LOGS=${SCRIPT_OS_DIR}/logs |
| ///usr/bin/env curl -LSs https://sh.jbang.dev | bash -s - "$0" "$@"; exit $? | |
| //DEPS org.springframework.boot:spring-boot-starter-web:2.3.4.RELEASE | |
| import org.springframework.web.bind.annotation.*; | |
| import org.springframework.boot.*; | |
| import org.springframework.boot.autoconfigure.*; | |
| import org.springframework.context.*; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.web.bind.annotation.RestController; | |
| import org.springframework.context.annotation.*; |
| font: | |
| catalog: | |
| Akkurat: | |
| normal: Akkurat-Light.ttf | |
| bold: Akkurat-Bold.ttf | |
| italic: Akkurat-Normal-Italic.ttf | |
| bold_italic: Akkurat-Bold-Italic.ttf | |
| # Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols | |
| Noto Serif: | |
| normal: notoserif-regular-subset.ttf |
| package rsb.rsocket.integration.integration; | |
| import lombok.extern.log4j.Log4j2; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.integration.core.MessageSource; | |
| import org.springframework.integration.dsl.IntegrationFlow; | |
| import org.springframework.integration.dsl.IntegrationFlows; | |
| import org.springframework.integration.dsl.MessageChannels; |
by Josh Long
twitter: @starbuxman
email: [email protected]
new book: http://ReactiveSpring.io
podcast: http://BootifulPodcast.fm
code: http://github.com/joshlong/the-reactive-revolution