Cloud-oriented Life

Cloud Native Technology Improves Lives

asdf and Golang (Go) Plugin

asdf is a single CLI tool for managing multiple runtime versions. It extend with a simple plugin system to install your favourite language: Dart, Elixir, Flutter, Golang (Go), Java, Node.js, Python, Ruby …

This article is about how to use asdf and Golang (Go) plugin to install multiple Golang (Go) versions on macOS with the Homebrew package manager.

Read more »

asdf and Java Plugin

asdf is a single CLI tool for managing multiple runtime versions. It extend with a simple plugin system to install your favourite language: Dart, Elixir, Flutter, Golang (Go), Java, Node.js, Python, Ruby …

This article is about how to use asdf and Java plugin to install multiple Java versions on macOS with the Homebrew package manager.

Read more »

Logging SQL with p6spy

P6Spy is a framework that enables database data to be seamlessly intercepted and logged with no code changes to existing application. The P6Spy distribution includes P6Log, an application which logs all JDBC transactions for any Java application.

Spring Boot autoconfiguration is handled by the separate project: gavlyukovskiy/spring-boot-data-source-decorator: Spring Boot integration with p6spy, datasource-proxy, flexy-pool and spring-cloud-sleuth - https://github.com/gavlyukovskiy/spring-boot-data-source-decorator, please consult the respective documentation for usage.

Read more »

Logging Java Persistence API (JPA) and Hibernate SQL

Spring JDBC and JPA provide abstractions over native JDBC APIs, allowing developers to do away with native SQL queries. However, we often need to see those auto-generated SQL queries and the order in which they were executed for debugging purposes.

Read more »

//go:embed

Go 1.16 introduced a new //go:embed directive that allows you to include the contents of arbitrary files and directories in your Go application.

The basic idea of embedding is that by adding a special comment to your code, Go will know to include a file or files. The comment should look like //go:embed FILENAME(S) and be followed by a variable of the type you want to embed: string or []byte for an individual file or embed.FS for a group of files.

The go:embed directive understands Go file globs, so patterns like files/.html will also work (but not **/.html recursive globbing).

You can read the official docs embed · pkg.go.dev - https://pkg.go.dev/embed for a complete technical explanation, so here let’s take a look at some examples to see what’s possible.

Read more »

GitHub action

Each time you push the code or create a new release on GitHub, you can trigger a workflow to publish your image. The workflow in the example below runs when the push event triggers.

In the example workflow below, we use the Docker build-push-action action to build the Docker image and, if the build succeeds, push the built image to Docker Hub.

Read more »

Querydsl JPA CRUD Usages

Querydsl defines a general statically typed syntax for querying on top of persisted domain model data. JDO and JPA are the primary integration technologies for Querydsl. This guide describes how to use Querydsl in combination with JPA.

Read more »
0%