JJUG CCC 2017 Fall での発表資料です ◆githubにサンプルプロジェクトあげてます https://github.com/maeharin/kotlin-dvd-rental-dev ◆Kotlinのイベント「どこでもKotlin」を開催してます! https://m3-engineer.connpass.com/event/70561/
5. DIの「D」とは? • Dependency:依存 • オブジェクトAは、オブジェクトBを使う • オブジェクトAにとって、オブジェクトBは「依存するオ ブジェクト」 • DIの「D」は、「依存するオブジェクト」を指す※ 5 オブジェクトA オブジェクトB 使う(メソッド呼出) ※「具象クラスへの依存」という解釈もあります 9. その①:使う側が自分で用意する • 使う側のプログラムが長くなる – 本質ではない処理が入り込む • 依存するオブジェクトの設定を変更したり、具象クラスを変更する場合は 、使う側のプログラムを修正する必要がある 9 public class FooDao { private DataSource dataSource; public FooDao() { BasicDataSource dataSource = new BasicDataSource();
ドメインロジックに焦点をあてる。 それが、ドメイン駆動設計の基本。 ドメイン駆動設計の考え方とやり方の説明と、実践基盤としての Spring Framework/Spring Boot を使った事例の紹介。Read less
バージョンはSpring4.2.X系 Springでのトランザクション管理 Springのトランザクション管理は大きく分けて以下の2つの管理方法が存在する。 1.プログラミングによるトランザクション管理 プログラミングによってトランザクションを手動管理する方法。以下のようなイメージでトランザクション制御コードをソースコード内に記述する。 transactionManager.begin(); transactionManager.commit(); transactionManager.rollback(); ソースコード内にトランザクション制御コードも入りこむため、見通しが悪くなったり制御を間違えるとバグの温床にもなったりするので、極力使うべきではない。 2.宣言的トランザクション管理 「あるメソッドを呼び出したときにトランザクションをかける」と宣言する方法。以下のようなイメージでメソッ
logbackにはMapped Diagnostic Contexts (MDC)というログに追加情報を付与する機能があります。 この機能は、Webアプリでログ出力を行う時にはとても便利です。 [Chapter 8: Mapped Diagnostic Context] (http://logback.qos.ch/manual/mdc.html) 説明 簡単な例を以下に記述します。 class MyAppController { org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger("myapp"); public void indexAction() { MDC.put("action", "index"); logger.debug("logging in indexAction"); func(); MDC.remo
JJUG CCC 2016 Spring で発表した時の資料です。
モノリスからマイクロサービスへの移行 ~ストラングラーパターンの検証~ (Spring Fest 2020講演資料) 2020年12月17日 NTTデータ 技術革新統括本部 横井 一輝 This document summarizes a microservices meetup hosted by @mosa_siru. Key points include: 1. @mosa_siru is an engineer at DeNA and CTO of Gunosy. 2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesi
There are already a few questions about the topic, but no response at all really provides arguments in order to explain why we shouldn't make a Spring MVC controller Transactional. See: Transaction not working correctly - Spring/MyBatis For web MVC Spring app should @Transactional go on controller or service? Making Spring 3 MVC controller method Transactional Spring MVC Controller Transactional S
This week, Juergen announced the Spring Framework 4.1 release candidate. Now is the time to test those new features and see how they can make your applications better! One of those new features is the flexible resolution and transformation of static web resources. Spring framework already allows you to serve static resources using ResourceHttpRequestHandlers. This feature gives you more power and
背景SpringBoot Acuatorについて動作確認したので、そのあたりのことをメモっときます。 概要 » Spring Boot Actuator でサーバの状態を確認する TECHSCORE BLOG 簡単にいうと、Spring BootアプリケーションにAcuatorを適用すると、アプリケーションの設定や状態を取得できるWebAPI(JSON)が自動で追加され、それらの情報がWebAPI経由で取得できるようになります。 適用するビルドスクリプトに依存を追加する Spring Boot Actuatorプロジェクト 設定は必須 https://github.com/spring-projects/spring-boot/tree/master/spring-boot-actuator Spring Boot Actuatorドキュメント 設定は任意。追加するとActuatorについ
こんにちは、鈴木です。 Spring Boot の続きです。Spring Boot Actuator を使うと、システムの状態やメトリクスを確認することができます。 Spring Boot Actuator を導入する 導入方法は pom.xml に追記するだけです。 <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/xsd/maven-4.0.0.xsd"> ... <dependencies> <!-- 追加: ここから --> <dependency> <groupId>o
今回は2015年11月にバージョン1.0.0がリリースされ、2016年4月19日に1.1がリリースされたmybatis-spring-boot-starterの使い方を紹介します。 MyBatisをSpring Boot上で使う際は、mybatis-springから提供されているSqlSessionFactoryBeanやSqlSessionTemplateのBean定義を開発者が行う必要がありましたが、mybatis-spring-boot-starterの登場によりこれらのBean定義は自動コンフィギュレーションによって解決されます まずは、実際にmybatis-spring-boot-starterを利用して簡単なCLI(Command Line Interface)アプリケーションを作ってみます 。 Note: 2019/7/16: 追記 JDK 13で導入予定(現時点ではPrev
今回は、Spring Boot 1.5.RC1の主な変更点を、リリースノートベースで紹介したいと思います。(1.5の正式リリースは今のところ2017/1/25に設定されており、まだまだ変更が入ると思いますが。。。) Note: 2017/01/15 「OAuth 2 Resource Filter」を追加。(RC1リリース後にリリースノートが修正されたため) Upgrading from Spring Boot 1.4 Spring Boot 1.4からSpring 1.5に移行する際に、影響がでる可能性がある主な変更点は以下の通りです。 Deprecations from Spring Boot 1.4 「Spring Boot 1.4で非推奨にしたAPIやプロパティキー」は、1.5で削除されます。 ちなみに・・・HornetQとVelocityは完全にサポート外になるので、Spring
今回は11/10にリリースが予定されているSpring Security 4.2の主な変更点を紹介します(なんとなくリリースは伸びる気がするけど・・・)。「Spring Security 4.1 主な変更点」の時と同様に、公式リファレンスの「What’s New in Spring Security 4.2」で紹介されている内容を、サンプルコードを交えて具体的に説明していきます。(逆にいうと、「What’s New in Spring Security 4.2」にのっていない変更点は紹介しないので、あしからず・・・ ) 4.2.0.RELEASE (2016/11/10) 予想に反して!?11/10にちゃんとリリースされました RC1のバグ修正や機能追加があったので反映しました。 動作検証環境 Spring Security 4.2.0.RC1 -> 4.2.0.RELEASE Sprin
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く