kagamihogeの日記

kagamihogeの日記です。

Java

JEP 345: NUMA-Aware Memory Allocation for G1をテキトーに訳した

http://openjdk.java.net/jeps/345 JEP 345: NUMA-Aware Memory Allocation for G1 Owner Sangheon Kim Type Feature Scope JDK Status Candidate Component hotspot/gc Discussion hotspot dash gc dash dev at openjdk dot java dot net Effort M Duration…

JEP 344: Abortable Mixed Collections for G1をテキトーに訳した

JEP 344: Abortable Mixed Collections for G1 http://openjdk.java.net/jeps/344 Owner Erik Helin Type Feature Scope Implementation Status Candidate Component hotspot/gc Discussion hotspot dash gc dash dev at openjdk dot java dot net Effort M …

JEP 334: JVM Constants APIをテキトーに訳した

http://openjdk.java.net/jeps/334 JEP 334: JVM Constants API Author Brian Goetz Owner Vicente Arturo Romero Zaldivar Type Feature Scope SE Status Candidate Component core-libs / java.lang.invoke Discussion amber dash dev at openjdk dot java…

JEP 335: Deprecate the Nashorn JavaScript Engineをテキトーに訳した

http://openjdk.java.net/jeps/335 JEP 335: Deprecate the Nashorn JavaScript Engine Owner Jim Laskey Type Feature Scope JDK Status Closed / Delivered Release 11 Component core-libs / jdk.nashorn Discussion jdk dash dev at openjdk dot java do…

JEP 336: Deprecate the Pack200 Tools and APIをテキトーに訳した

http://openjdk.java.net/jeps/336 JEP 336: Deprecate the Pack200 Tools and API Author Kumar Srinivasan Owner Henry Jen Type Feature Scope SE Status Closed/Delivered Release 11 Component tools Discussion jdk dash dev at openjdk dot java dot …

JEP 343: Packaging Toolをテキトーに訳した

http://openjdk.java.net/jeps/343 JEP 343: Packaging Tool Owner Kevin Rushforth Type Feature Scope JDK Status Candidate Component deploy / packager Discussion core dash libs dash dev at openjdk dot java dot net Effort M Duration M Relates t…

RedisのLISTに1件ずつとまとめてPUSHするときの速度差

Redisをはじめて触るので色々と試している。とりあえず基本的なパフォーマンスを見るということで、LISTに1件ずつPUSHする場合と、ある程度まとめてPUSHする場合の速度差を見る。それによってRedisを学ぶのが目的である。 ソースコード pom.xml <parent> <groupId>org.springf</groupid></parent>…

spring-bootでredisつかう

spring-bootのspring-boot-starter-data-redisを使用してRedisにアクセスする。とりあえずhello worldレベルのことをやる。 ソースコード pom.xml <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.5.RELEASE</version> <relativePath /> </parent> <properties> </properties>

spring-bootのspring-data-jpaでJTAにAtomikosを使用する

spring-bootでspring-data-jpaを使う場合JTAはHIkariCPが特に何も設定しなくても使われる。通常はこれで何ら問題は無いが以下ではJTAをAtomikosに変更するやり方のメモ。 pom.xml <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.3.RELEASE</version> </parent> <properties> <java.version>10.0</java.version></properties>

テスト駆動開発

昔、自分がどのようにプログラミングをしているか、を文章に書き起こせるか、という話を同僚としたことがある。それで書いてみようとしたのだが、すぐに行き詰った。最大の壁は自分の思考を文章にすることで、文章は基本的に上から順に読む線形の構造になる…

spring bootとthymeleafでfragmentsを使用してajaxをする

準備 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.3.RELEASE</version> </parent> <properties> <java.version>10.0</java.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> </dependencies>

Spring RetryのREADME読んだ

https://github.com/spring-projects/spring-retry 初めて使ったんで記念にREADME読んだ。 spring-retry - README.md 本プロジェクトはSpringアプリケーションで宣言的なリトライ機能を提供します。Spring Batch, Spring Integration, Spring for Apache Had…

Spring BootでSpring Securityをredisでうごかす

Spring Securityのセッション保存先をメモリからredisに変更する。 やること redisのインストール 他サイトを見て適当なマシンにredisをインストールしておく。 依存性の追加 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.1.RELEASE</version> </parent>

JEP 326: Raw String Literalsをテキトーに訳した

http://openjdk.java.net/jeps/326 JEP 326: Raw String Literals Owner Jim Laskey Created 2018/01/23 15:40 Updated 2018/04/03 18:29 Type Feature Status Candidate Component specification / language Scope SE Discussion amber dash dev at openjdk…

Web on Reactive Stack(version 5.0.3.RELEASE) 2. WebClientをテキトーに訳した

https://docs.spring.io/spring/docs/5.0.3.RELEASE/spring-framework-reference/web-reactive.html#webflux-client 2. WebClient spring-webfluxモジュールには、Reactive Streamsのバックプレッシャを用いるHTTPリクエスト用のノンブロッキング・リアクテ…

Web on Reactive Stack(version 5.0.3.RELEASE) 1. Spring WebFluxをテキトーに訳した(1.5 - 1.9)

1.5. Functional Endpoints Spring WebFluxには、軽量な関数型プログラミングモデルがあり、関数ではルーティング・リクエスト処理とイミュータブルな設計を行います。アノテーションベースとは別のプログラミングモデルですが、基礎部分で動作するReactive …

Web on Reactive Stack(version 5.0.3.RELEASE) 1. Spring WebFluxをテキトーに訳した(1.4)

1.4. Annotated Controllers Spring MVCと同等 Spring WebFluxはアノテーションベースのプログラミングモデルを提供しており、@Controllerと@RestControllerコンポーネントは、リクエストマッピング・リクエスト入力・例外ハンドリングなど、を表現するのに…

Web on Reactive Stack(version 5.0.3.RELEASE) 1. Spring WebFluxをテキトーに訳した(1.1 - 1.3)

Spring WebFluxってなんだ? って感じだったんで https://docs.spring.io/spring/docs/5.0.3.RELEASE/spring-framework-reference/web-reactive.html を読んでテキトーに訳した。なおマッタクといっていいほど推敲してないです。 Web on Reactive Stack この…

JEP 323: Local-Variable Syntax for Lambda Parametersをテキトーに訳した

http://openjdk.java.net/jeps/323 を読んだ。 JEP 323: Local-Variable Syntax for Lambda Parameters Author Brian Goetz Owner Vicente Arturo Romero Zaldivar Created 2017/12/08 15:15 Updated 2018/02/12 17:25 Type Feature Status Targeted Compone…

JEP 321: HTTP Client (Standard)をテキトーに訳した

http://openjdk.java.net/jeps/321 を読んだ。 JEP 321: HTTP Client (Standard) Owner Chris Hegarty Created 2017/06/08 11:46 Updated 2018/01/31 16:29 Type Feature Status Candidate Component core-libs/java.net Scope SE Discussion net dash dev a…

JEP 325: Switch Expressionsをテキトーに訳した

http://openjdk.java.net/jeps/325 をテキトーに訳した。 JEP 325: Switch Expressions Author Brian Goetz Owner Jan Lahoda Created 2017/12/04 08:56 Updated 2018/01/29 16:23 Type Feature Status Candidate Component specification/language Scope SE…

FlywayのdocumentationのConceptsを読んだ

https://flywaydb.org/documentation/ を読んだ。 Overview Flywayはデータベースマイグレーションをやりやすくします。 Tip: すぐに読み終えられるのでGet Startedセクションを先に目を通すことをオススメします。 Flywayはオープンソースのデータベースマ…

Flywayのチュートリアル読んだ

flyway使ってるの初めて見て良く分からん感じだったのでとりあえずチュートリアル https://flywaydb.org/getstarted/ を読んで訳した。 ※画像はすべて本家のものです。 Why database migrations? まず最初にShinyというプロジェクトを仮定し、ここでの成果物…

WildFly 11 + Spring Boot

直近でWildFly 11でSpring Boot動かすのに調べたことのメモ。といっても、WildFlyプラスそのプロジェクト固有事情による設定とかの内容も混じっている。ただまぁ、自分用の作業ログなので余りそのへんは気にしない。 ソースコード https://github.com/kagami…

JEP 307: Parallel Full GC for G1をテキトーに訳した

http://openjdk.java.net/jeps/307 をテキトーに訳した。 JEP 307: Parallel Full GC for G1 Owner Stefan Johansson Created 2017/01/17 11:40 Updated 2017/11/13 16:52 Type Feature Status Targeted Component hotspot?/?gc Scope Implementation Discus…

Spring Bootをeclipseのdynamic web projectとして実行する

spirng-bootには組み込みコンテナがあるので、開発時にアプリケーションサーバ上で動かしたいケースはアンマリ無いが、一応メモ。といっても、jarからwarに変更する際の手順をやればよいだけ。参照:https://docs.spring.io/spring-boot/docs/current/refere…

Difference between @RestController and @Controller Annotation in Spring MVC and RESTをテキトーに訳した

http://javarevisited.blogspot.jp/2017/08/difference-between-restcontroller-and-controller-annotations-spring-mvc-rest.html を読んだ。実はspringよく知らずに使っている。 Difference between @RestController and @Controller Annotation in Spring…

What does the InternalResourceViewResolver do in Spring MVC?をテキトーに訳した

http://javarevisited.blogspot.jp/2017/08/what-does-internalresourceviewresolver-do-in-spring-mvc.html を読んだ。 What does the InternalResourceViewResolver do in Spring MVC? InternalResourceViewResolverはSpring MVCフレームワークのViewResol…

WildFly 10のCache-Controlヘッダ変更

standalone.xmlの以下の箇所を編集する。 <subsystem xmlns="urn:jboss:domain:undertow:3.1"> <buffer-cache name="default"/> <server name="default-server"> <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/> </http-listener></server></buffer-cache></subsystem>

JEP 305: Pattern Matchingをテキトーに訳した

2016/02/23 コメントを基に修正。 http://openjdk.java.net/jeps/305 をテキトーに訳した。 JEP 305: Pattern Matching Author Brian Goetz Owner Gavin Bierman Created 2017/05/30 19:48 Updated 2017/06/16 16:25 Type Feature Status Candidate Componen…