SlideShare une entreprise Scribd logo
1  sur  61
Télécharger pour lire hors ligne
Copyright©2018 NTT corp. All Rights Reserved.
0 1 0
7 2
5
1 02
8
Copyright©2018 NTT corp. All Rights Reserved.
•
• 3
• L FDCa c
• ST L FD VC
• 56 N L C W
•
• 0: 56 76
• 0: .2 0:
• 06 0615:17
Copyright©2018 NTT corp. All Rights Reserved.
KFI
? 8 /4 4 D24C )
? 8 75B? C ( ) )
? 8 7 ) )
? 8 1 78?4 ( )
? 8 4 59 )
? 8 * )
? 8 . B D0 59 7C
7 3 C 1 *
Copyright©2018 NTT corp. All Rights Reserved.
•
•
•
•
•
•
•
•
•
Copyright©2018 NTT corp. All Rights Reserved.
01 2 1
7 5
Copyright©2018 NTT corp. All Rights Reserved.
•
•
•
•
•
•
•
•
•
•
Copyright©2018 NTT corp. All Rights Reserved.
. . . 0
Copyright©2018 NTT corp. All Rights Reserved.
. 0 0 0 . 2
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>
spring-boot-starter-data-mongodb
</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
0
Copyright©2018 NTT corp. All Rights Reserved.
0 2 F
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>
spring-boot-starter-data-mongodb-reactive
</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
0
.0 0 : C B A
Copyright©2018 NTT corp. All Rights Reserved.
•
• 01
• 01 1
•
• 01
•
• 01
• 01 1
• 01
• 01
Copyright©2018 NTT corp. All Rights Reserved.
• )( ) )
•
•
•
•
AAA
)( ( )( ) )
1
1
AAA
F E P
L HMP
R
Copyright©2018 NTT corp. All Rights Reserved.
- @ A - @ CF
@ @ , C A
A @
- @
- @ @
A @ CF
, - @ A
/ @
, C @ C A
1 ( )-
(22 ( -(2
1 ( )- - @ M IJH
Copyright©2018 NTT corp. All Rights Reserved.
• )( ) )
• 1 1 1
• 1
• 1 1 1 1
• 1 1 1 1
)( ( )( ) )
1 1
31 1
1
A 1
1
1 1 1
1
1 1
LT
1 RUM S WH
UP
1 1 1
1 1
1 AF
FE
Copyright©2018 NTT corp. All Rights Reserved.
• A
• 1 1
• 4
• 4 1
• 4 1 4
)
1
1
4 1
1
A F
H L
E
)
4
)
) (
Copyright©2018 NTT corp. All Rights Reserved.
• A
• -
• - :
• - A
• - :
FFF
)
A : 0 :
/ 1
5 A / 1
:. 0: 0 :
/ 1
A
FFF
R W
/ 1 S T
)
:
)
) (
h c IH L dg
- :5 - A E biea
0 : .0 AE0 0 A 0 :5 A E
Copyright©2018 NTT corp. All Rights Reserved.
. +
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
Copyright©2018 NTT corp. All Rights Reserved.
+ +
B A C
$ wget http://localhost:8080 --header='Accept: application/json
--2018-01-23 16:05:32-- http://localhost:8080/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:8080... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Username/Password Authentication Failed.
B A C: + + : F
Copyright©2018 NTT corp. All Rights Reserved.
@Configuration
@EnableWebFluxSecurity
public class SimpleSecurityConfig{
@Bean
public MapReactiveUserDetailsService userDetailsRepository() {
UserDetails user = User.withDefaultPasswordEncoder()
.username("user")
.password("password")
.roles("USER")
.build();
UserDetails admin = User.withDefaultPasswordEncoder()
.username("admin")
.password("admin")
.roles("ADMIN","USER")
.build();
return new MapReactiveUserDetailsService(user, admin);
}
( ) S F
( + ) W
) . S :
Copyright©2018 NTT corp. All Rights Reserved.
@Bean
public SecurityWebFilterChain springSecurityFilterChain(
ServerHttpSecurity http) {
http
.authorizeExchange()
.pathMatchers("/resources/**").permitAll()
.pathMatchers("/login").permitAll()
.pathMatchers("/admin").hasRole("ADMIN")
.anyExchange().authenticated()
.and()
.formLogin()
.loginPage("/login");
return http.build();
}
}
+ C :
+ + + +
+
Copyright©2018 NTT corp. All Rights Reserved.
•
• 2 0
• 2 0 / 2
• 2 0
• )/ 2 /)/ 2 )/ 2 / / /
• )
• 2 / ( 0
•
• 2 0
• 2 0 / 2
• 2 0
• 2 0
Copyright©2018 NTT corp. All Rights Reserved.
• , , , , , , , S
K / - NR
• C 2 2 B D
• D T B
• 21 2
• 1
• 2
•
- : , , T
Copyright©2018 NTT corp. All Rights Reserved.
public interface MongoRepository<T,ID> extends
PagingAndSortingRepository<T,ID>,
QueryByExampleExecutor<T>{
<S extends T> List<S> findAll(Example<S> example);
<S extends T> S insert(S entity);
// omitted
public interface ReactiveMongoRepository<T,ID> extends
ReactiveSortingRepository<T,ID>,
ReactiveQueryByExampleExecutor<T>{
<S extends T> Flux<S> findAll(Example<S> example);
<S extends T> Mono<S> insert(S entity);
// omitted
Copyright©2018 NTT corp. All Rights Reserved.
public class MongoTemplate implements MongoOperations,
ApplicationContextAware,
IndexOperationsProvider{
public <T> List<T> findAll(Class<T> entityClass) {
// omitted
public class ReactiveMongoTemplate implements
ReactiveMongoOperations,
ApplicationContextAware{
public <T> Flux<T> findAll(Class<T> entityClass) {
// omitted
Copyright©2018 NTT corp. All Rights Reserved.
public interface RxJava2CrudRepository<T,ID> extends
Repository<T,ID> {
<S extends T> Single<S> save(S entity);
<S extends T> Flowable<S> saveAll(Iterable<S> entities);
Maybe<T> findById(ID id);
// omitted
Copyright©2018 NTT corp. All Rights Reserved.
• ( )
• DR 25
R
• C
• /D a c
• f
• f d C C Be R T
( )
Copyright©2018 NTT corp. All Rights Reserved.
public interface MyReactiveRepository extends
ReactiveCrudRepository<Foo,String>{
@Tailable
public Flux<Foo> findWithTailableCursorBy();
}
@GetMapping(value=”foo", produces="text/event-stream")
public Flux<Foo> getFoo(){
return repository.findWithTailableCursorBy();
}
+
Copyright©2018 NTT corp. All Rights Reserved.
+
@Autowired
ReactiveMongoTemplate template;
// omitted
@GetMapping(value="foo", produces="text/event-stream")
public Flux<Foo> getFoo(){
return template.tail(
new BasicQuery(new Document()),
Foo.class);
}
Copyright©2018 NTT corp. All Rights Reserved.
01 2 1
78
Copyright©2018 NTT corp. All Rights Reserved.
•
•
• 2
•
•
•
• 2 9
•
• 2
•
•
Copyright©2018 NTT corp. All Rights Reserved.
• . . . 02
• 1 3 J OR Wb
D @ 0 1 3 1 3 a
• D 1 3 M
• D @ 2 1 3 1 3 a
• ,2.1 2 . 3 3 2 2 . 3 2 2 2 2 . 3 a
E
.
. . 2 0 :
Copyright©2018 NTT corp. All Rights Reserved.
.
0 . :
public class LoggersEndpoint
extends AbstractEndpoint<Map<String,Object>> {
@Override
public Map<String,Object> invoke() {
// omitted
}
public class LoggersMvcEndpoint extends EndpointMvcAdapter{
@ActuatorPostMapping("/{name:.*}")
@ResponseBody
@HypermediaDisabled
public Object set(@PathVariableString name,
@RequestBodyMap<String,String> configuration) {
// omitted
}
2 1
Copyright©2018 NTT corp. All Rights Reserved.
2 0.
:A A EG
@Endpoint(id="loggers")
public class LoggersEndpoint {
@ReadOperation
public Map<String,Object> loggers() {
// omitted
}
@WriteOperation
public void configureLogLevel(@Selector String name,
@NullableLogLevel configuredLevel) {
// omitted
}
B :
B :
Copyright©2018 NTT corp. All Rights Reserved.
. . . 0
https://micrometer.io
Copyright©2018 NTT corp. All Rights Reserved.
2 00 20. 2
2 00
20. 2
B :
A
M
Copyright©2018 NTT corp. All Rights Reserved.
+ +
BE
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<scope>runtime</scope>
</dependency>
management.endpoints.web.expose=health,info,prometheus
+ E
Copyright©2018 NTT corp. All Rights Reserved.
+
/ /
Copyright©2018 NTT corp. All Rights Reserved.
+
scrape_configs:
- job_name: 'spring-boot2'
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['localhost:8080']
Copyright©2018 NTT corp. All Rights Reserved.
+
Copyright©2018 NTT corp. All Rights Reserved.
+ +
Copyright©2018 NTT corp. All Rights Reserved.
https://micrometer.io/docs/ref/spring/1.5
Copyright©2018 NTT corp. All Rights Reserved.
•
• 12. 00
• 12. 42.
• 12.
•
• 12. 00
• 12. 42.
• 4
• 12.
• 12.
Copyright©2018 NTT corp. All Rights Reserved.
• 2 0
• uz N S O 0 2 nrRyil
• 5 5.
• 50 0 2 5 5 5, 5 5 0 2 nrR
l O e
• 225
• 4502. , 50 Rp nr
• 02 5
• he nr
5 5.
4502. , 50 R a
u g Rt s A C
4502. , 50 h h c N nrvo
Copyright©2018 NTT corp. All Rights Reserved.
. 0
0 A 5 .C
R W l
S W
P l
)A D3 1 B
0 A 5 1 B
2 4S l
/ 5 0 A 5 )
/ 5 0 A 5
/ 5 0 A 5
( .)A . 5
hci IOa
(
e
d
b
(
hciI
Copyright©2018 NTT corp. All Rights Reserved.
. 0
1 C B / B
e c
D
y
bd
D B I5D 2 B B
1 C B 2 B B
4 a
0B D D 1 C B
0B D D 1 C B
0B D D 1 C B
( S / D /A .- DRT
sv w D Wk
(
uz h
uzgn
l
(
sv w uz
T Rt PO SoiW
2AB : 2 B D ( r p )
DDAC) C C 5B D 5 5. 5DC 5 CAB : C B D (B A BD
Copyright©2018 NTT corp. All Rights Reserved.
<dependencies>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-oauth2-jose</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Copyright©2018 NTT corp. All Rights Reserved.
, , , IF
spring.security.oauth2.client:
registration:
facebook:
client-secret: aaaabbbbbccccdddd111122223333
client-id: xxxxxxxxxxxxxxxxx
• , / , / IF
• O C G D IF H
Copyright©2018 NTT corp. All Rights Reserved.
spring.security.oauth2.client:
registration:
XXX:
client-secret: abcdefg1234567abcdefg1234567
client-id: xxxxyyyyxxxxyyyy
redirect-uri-template: "{baseUrl}/login/oauth2/code/XXX"
client-name: XXX
client-authentication-method: post
authorization-grant-type: authorization_code
scope:
openid
profile
provider:
XXX:
authorization-uri:https://…
token-uri:https://…
user-info-uri:https://…
jwk-set-uri:https://…
Copyright©2018 NTT corp. All Rights Reserved.
Copyright©2018 NTT corp. All Rights Reserved.
•
•
• 4
•
•
•
• 4
•
• 9
• 9
•
Copyright©2018 NTT corp. All Rights Reserved.
( ( ( )
public interface CrudRepository<T,ID extends Serializable>
extends Repository<T,ID>{
T findOne(ID id);
Iterable<T> findAll();
Iterable<T> findAll(Iterable<ID> ids);
boolean exists(ID id);
public interface CrudRepository<T,ID> extends Repository<T,ID>{
Optional<T> findById(ID id);
Iterable<T> findAll();
Iterable<T> findAllById(Iterable<ID> ids);
boolean existsById(ID id);
(
(
Copyright©2018 NTT corp. All Rights Reserved.
( ( ( ( )
public interface CrudRepository<T,ID extends Serializable>
extends Repository<T,ID>{
<S extends T> S save(S entity);
<S extends T> Iterable<S> save(Iterable<S> entities);
public interface CrudRepository<T,ID> extends Repository<T,ID>{
<S extends T> S save(S entity);
<S extends T> Iterable<S> saveAll(Iterable<S> entities);
(
(
Copyright©2018 NTT corp. All Rights Reserved.
( ( ( )
public interface CrudRepository<T,ID extends Serializable>
extends Repository<T,ID>{
void delete(ID id);
void delete(T entity);
void delete(Iterable<? extends T> entities);
void deleteAll();
public interface CrudRepository<T,ID> extends Repository<T,ID>{
void deleteById(ID id);
void delete(T entity);
void deleteAll(Iterable<? extends T> entities);
void deleteAll();
(
(
Copyright©2018 NTT corp. All Rights Reserved.
public interface Custom{
// omitted
}
public class FooRepositoryImpl implements Custom{
// omitted
}
public interface FooRepository extends Custom,
CrudRepository<Foo,String>{
}
:
e a C D C SK
a C d
g Da R I R SK
g eD d
eD
Da C
Copyright©2018 NTT corp. All Rights Reserved.
public interface Custom{
// omitted
}
public class CustomImpl implements Custom{
// omitted
}
public interface FooRepository extends Custom,
CrudRepository<Foo,String>{
}
:
e a C D C SK
a C d
g Da R I R SK
e eD d
eD
Da C
Copyright©2018 NTT corp. All Rights Reserved.
public interface Custom{
// omitted
}
public class CustomImpl implements Custom{
// omitted
}
public interface FooRepository extends Custom, Custom2,
CrudRepository<Foo,String>{
}
:
i d D I R D K
d D g
d S S K
i i g
i
Ca
e d D
Copyright©2018 NTT corp. All Rights Reserved.
•
•
•
•
•
•
•
•
•
•
• 6 5
Copyright©2018 NTT corp. All Rights Reserved.
• R S
• B . W C / 0B I
• 0 .4 . . .4 .
. W J C C : .
0 : .
Copyright©2018 NTT corp. All Rights Reserved.
0 . 0
@Bean
public FlatFileItemReader<Foo> reader(Resource resource)
throws Exception{
FlatFileItemReader<Foo> reader = new FlatFileItemReader<>();
reader.setName(“fooReader”);
reader.setResource(resource);
BeanWrapperFieldSetMapper<Foo>fieldSetMapper=
new BeanWrapperFieldSetMapper<>();
fieldSetMapper.setTargetType(Foo.class);
fieldSetMapper.afterPropertiesSet();
DelimitedLineTokenizer tokenizer = new DelimitedLineTokenizer();
tokenizer.setNames( new String[] {“first”, “second”, “third”});
tokenizer.afterPropertiesSet();
DefaultLineMapper lineMapper = new DefaultLineMapper();
lineMapper.setLineTokenizer(tokenizer);
lineMapper.setFieldSetMapper(fieldSetMapper);
reader.setLineMapper(lineMapper);
return reader;
}
4 3
Copyright©2018 NTT corp. All Rights Reserved.
. 0 4
@Bean
public FlatFileItemReader<Foo> reader(Resource resource) {
return new FlatFileItemReaderBuilder<Foo>()
.name(“fooReader”)
.resource(resource)
.delimited()
.names(new String[]{“first”, “second”, “third”})
.targetType(Foo.class)
.build();
}
Copyright©2018 NTT corp. All Rights Reserved.
0 . B : 4
M J :L 4
4 4 4 -0 - 4 -0 6 0 /. -0 6 /.
Copyright©2018 NTT corp. All Rights Reserved.
0 . B : 4
M J :L 4
-66 4.1 . 4.1 6 - 4 4 1 -60/ .1 -60/

Contenu connexe

Tendances

DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
Hank Preston
 

Tendances (13)

Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaS
Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaSOverpowered Kubernetes: CI/CD for K8s on Enterprise IaaS
Overpowered Kubernetes: CI/CD for K8s on Enterprise IaaS
 
OPNFV Doctor - OpenStack最新情報セミナー 2017年7月
OPNFV Doctor - OpenStack最新情報セミナー 2017年7月OPNFV Doctor - OpenStack最新情報セミナー 2017年7月
OPNFV Doctor - OpenStack最新情報セミナー 2017年7月
 
Kerbernetes Robotics Distributed System Deep Dive
Kerbernetes Robotics Distributed System Deep DiveKerbernetes Robotics Distributed System Deep Dive
Kerbernetes Robotics Distributed System Deep Dive
 
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
OpenStack Summit Tokyo - Know-how of Challlenging Deploy/Operation NTT DOCOMO...
 
JVM and OS Tuning for accelerating Spark application
JVM and OS Tuning for accelerating Spark applicationJVM and OS Tuning for accelerating Spark application
JVM and OS Tuning for accelerating Spark application
 
PyTorch Python Tutorial | Deep Learning Using PyTorch | Image Classifier Usin...
PyTorch Python Tutorial | Deep Learning Using PyTorch | Image Classifier Usin...PyTorch Python Tutorial | Deep Learning Using PyTorch | Image Classifier Usin...
PyTorch Python Tutorial | Deep Learning Using PyTorch | Image Classifier Usin...
 
The Ring programming language version 1.9 book - Part 206 of 210
The Ring programming language version 1.9 book - Part 206 of 210The Ring programming language version 1.9 book - Part 206 of 210
The Ring programming language version 1.9 book - Part 206 of 210
 
FLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 FrankfurtFLOW3 Tutorial - T3CON11 Frankfurt
FLOW3 Tutorial - T3CON11 Frankfurt
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
 
Power of vi
Power of viPower of vi
Power of vi
 
Apache Sparkを用いたスケーラブルな時系列データの異常検知モデル学習ソフトウェアの開発
Apache Sparkを用いたスケーラブルな時系列データの異常検知モデル学習ソフトウェアの開発Apache Sparkを用いたスケーラブルな時系列データの異常検知モデル学習ソフトウェアの開発
Apache Sparkを用いたスケーラブルな時系列データの異常検知モデル学習ソフトウェアの開発
 
Puppet devops wdec
Puppet devops wdecPuppet devops wdec
Puppet devops wdec
 
How to Enterprise Node
How to Enterprise NodeHow to Enterprise Node
How to Enterprise Node
 

Similaire à SpringOne Platform 2017報告会 メインプロジェクトのアップデート

DevOpsに憧れたAWS初心者が Code3兄弟+Fargateで CI/CD実現したら 社内から賞賛された話
DevOpsに憧れたAWS初心者がCode3兄弟+FargateでCI/CD実現したら社内から賞賛された話DevOpsに憧れたAWS初心者がCode3兄弟+FargateでCI/CD実現したら社内から賞賛された話
DevOpsに憧れたAWS初心者が Code3兄弟+Fargateで CI/CD実現したら 社内から賞賛された話
slideman55
 

Similaire à SpringOne Platform 2017報告会 メインプロジェクトのアップデート (20)

Case Study: Large Scale Deployment for Machine Learning with Highspeed Storage
Case Study: Large Scale Deployment for Machine Learning with Highspeed StorageCase Study: Large Scale Deployment for Machine Learning with Highspeed Storage
Case Study: Large Scale Deployment for Machine Learning with Highspeed Storage
 
20170322_ICON21技術セミナー1_加藤
20170322_ICON21技術セミナー1_加藤20170322_ICON21技術セミナー1_加藤
20170322_ICON21技術セミナー1_加藤
 
20170322_ICON21技術セミナー1_加藤
20170322_ICON21技術セミナー1_加藤20170322_ICON21技術セミナー1_加藤
20170322_ICON21技術セミナー1_加藤
 
DevOpsに憧れたAWS初心者が Code3兄弟+Fargateで CI/CD実現したら 社内から賞賛された話
DevOpsに憧れたAWS初心者がCode3兄弟+FargateでCI/CD実現したら社内から賞賛された話DevOpsに憧れたAWS初心者がCode3兄弟+FargateでCI/CD実現したら社内から賞賛された話
DevOpsに憧れたAWS初心者が Code3兄弟+Fargateで CI/CD実現したら 社内から賞賛された話
 
NVIDIA/deepopsを触ってみた話
NVIDIA/deepopsを触ってみた話NVIDIA/deepopsを触ってみた話
NVIDIA/deepopsを触ってみた話
 
APIに関するセッション資料
APIに関するセッション資料APIに関するセッション資料
APIに関するセッション資料
 
How to Use Telegraf and Its Plugin Ecosystem
How to Use Telegraf and Its Plugin EcosystemHow to Use Telegraf and Its Plugin Ecosystem
How to Use Telegraf and Its Plugin Ecosystem
 
[Oracle Innovation Summit Tokyo 2018] ブロックチェーンで切り拓く新たな世界
[Oracle Innovation Summit Tokyo 2018] ブロックチェーンで切り拓く新たな世界[Oracle Innovation Summit Tokyo 2018] ブロックチェーンで切り拓く新たな世界
[Oracle Innovation Summit Tokyo 2018] ブロックチェーンで切り拓く新たな世界
 
Introduction to Node-RED
Introduction to Node-REDIntroduction to Node-RED
Introduction to Node-RED
 
Peering in Japan from JPNAP perspective
Peering in Japan from JPNAP perspectivePeering in Japan from JPNAP perspective
Peering in Japan from JPNAP perspective
 
[Oracle Innovation Summit Tokyo 2018] インダストリアルIoTの今、そしてこれからの進化
[Oracle Innovation Summit Tokyo 2018] インダストリアルIoTの今、そしてこれからの進化[Oracle Innovation Summit Tokyo 2018] インダストリアルIoTの今、そしてこれからの進化
[Oracle Innovation Summit Tokyo 2018] インダストリアルIoTの今、そしてこれからの進化
 
OpenWorld 2018 - 20 years of hints and tips
OpenWorld 2018 - 20 years of hints and tipsOpenWorld 2018 - 20 years of hints and tips
OpenWorld 2018 - 20 years of hints and tips
 
Japan Container Days v18.12 1C5 Kubernetes+ロボット(ROS)アプリの連携パラダイム
Japan Container Days v18.12 1C5 Kubernetes+ロボット(ROS)アプリの連携パラダイムJapan Container Days v18.12 1C5 Kubernetes+ロボット(ROS)アプリの連携パラダイム
Japan Container Days v18.12 1C5 Kubernetes+ロボット(ROS)アプリの連携パラダイム
 
20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge
20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge
20180921_DOAG_BigDataDays_OracleSpatialandPython_kpatenge
 
Global EC Cluster Updates (OpenStack Mitaka Swift Design Summit)
Global EC Cluster Updates (OpenStack Mitaka Swift Design Summit)Global EC Cluster Updates (OpenStack Mitaka Swift Design Summit)
Global EC Cluster Updates (OpenStack Mitaka Swift Design Summit)
 
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
 
[Code night] natural language proccessing and machine learning
[Code night] natural language proccessing and machine learning[Code night] natural language proccessing and machine learning
[Code night] natural language proccessing and machine learning
 
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxDataSensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
Sensor Data in InfluxDB by David Simmons, IoT Developer Evangelist | InfluxData
 
Ros: 站在巨人的肩膀上
Ros: 站在巨人的肩膀上Ros: 站在巨人的肩膀上
Ros: 站在巨人的肩膀上
 
Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)Project Helidon Overview (Japanese)
Project Helidon Overview (Japanese)
 

Plus de Takuya Iwatsuka

Plus de Takuya Iwatsuka (13)

SpringとGrarlVM Native Image -2019/12-
SpringとGrarlVM Native Image -2019/12-SpringとGrarlVM Native Image -2019/12-
SpringとGrarlVM Native Image -2019/12-
 
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
Spring I/O 2019 報告 Spring Frameworkのロードマップと5.2の新機能
 
SpringOne Platform 2018 全体報告
SpringOne Platform 2018 全体報告SpringOne Platform 2018 全体報告
SpringOne Platform 2018 全体報告
 
Spring tools4
Spring tools4Spring tools4
Spring tools4
 
Spring I/O 2018 報告 RESTDocs RAML, Cloud Contract
Spring I/O 2018 報告 RESTDocs RAML, Cloud ContractSpring I/O 2018 報告 RESTDocs RAML, Cloud Contract
Spring I/O 2018 報告 RESTDocs RAML, Cloud Contract
 
Spring Security 5.0 解剖速報
Spring Security 5.0 解剖速報Spring Security 5.0 解剖速報
Spring Security 5.0 解剖速報
 
Spring I/O 2017 報告 ThymeleafのWebFlux対応
Spring I/O 2017 報告 ThymeleafのWebFlux対応Spring I/O 2017 報告 ThymeleafのWebFlux対応
Spring I/O 2017 報告 ThymeleafのWebFlux対応
 
Spring 5に備えるリアクティブプログラミング入門
Spring 5に備えるリアクティブプログラミング入門Spring 5に備えるリアクティブプログラミング入門
Spring 5に備えるリアクティブプログラミング入門
 
SpringOne 2016 報告 Reactive APIの設計・実装・使用
SpringOne 2016 報告 Reactive APIの設計・実装・使用SpringOne 2016 報告 Reactive APIの設計・実装・使用
SpringOne 2016 報告 Reactive APIの設計・実装・使用
 
Spring I/O 2016 報告 Test / Cloud / Other Popular Sessions
Spring I/O 2016 報告 Test / Cloud / Other Popular SessionsSpring I/O 2016 報告 Test / Cloud / Other Popular Sessions
Spring I/O 2016 報告 Test / Cloud / Other Popular Sessions
 
Spring social の基礎
Spring social の基礎Spring social の基礎
Spring social の基礎
 
Password validation with Passay
Password validation with PassayPassword validation with Passay
Password validation with Passay
 
Spring I/O 2015 報告
Spring I/O 2015 報告Spring I/O 2015 報告
Spring I/O 2015 報告
 

Dernier

一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
tuuww
 
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DrGurudutt
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
Kamal Acharya
 
Teachers record management system project report..pdf
Teachers record management system project report..pdfTeachers record management system project report..pdf
Teachers record management system project report..pdf
Kamal Acharya
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdf
Kamal Acharya
 
Lecture_8-Digital implementation of analog controller design.pdf
Lecture_8-Digital implementation of analog controller design.pdfLecture_8-Digital implementation of analog controller design.pdf
Lecture_8-Digital implementation of analog controller design.pdf
mohamedsamy9878
 

Dernier (20)

Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptx
 
2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge2024 DevOps Pro Europe - Growing at the edge
2024 DevOps Pro Europe - Growing at the edge
 
internship exam ppt.pptx on embedded system and IOT
internship exam ppt.pptx on embedded system and IOTinternship exam ppt.pptx on embedded system and IOT
internship exam ppt.pptx on embedded system and IOT
 
Peek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdfPeek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdf
 
Electrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission lineElectrostatic field in a coaxial transmission line
Electrostatic field in a coaxial transmission line
 
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
一比一原版(UNK毕业证)内布拉斯加州立大学科尼分校毕业证成绩单
 
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdfDR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
DR PROF ING GURUDUTT SAHNI WIKIPEDIA.pdf
 
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWINGBRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
BRAKING SYSTEM IN INDIAN RAILWAY AutoCAD DRAWING
 
Paint shop management system project report.pdf
Paint shop management system project report.pdfPaint shop management system project report.pdf
Paint shop management system project report.pdf
 
Lect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptxLect 2 - Design of slender column-2.pptx
Lect 2 - Design of slender column-2.pptx
 
Teachers record management system project report..pdf
Teachers record management system project report..pdfTeachers record management system project report..pdf
Teachers record management system project report..pdf
 
İTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering WorkshopİTÜ CAD and Reverse Engineering Workshop
İTÜ CAD and Reverse Engineering Workshop
 
Online book store management system project.pdf
Online book store management system project.pdfOnline book store management system project.pdf
Online book store management system project.pdf
 
Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2Research Methodolgy & Intellectual Property Rights Series 2
Research Methodolgy & Intellectual Property Rights Series 2
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdf
 
Attraction and Repulsion type Moving Iron Instruments.pptx
Attraction and Repulsion type Moving Iron Instruments.pptxAttraction and Repulsion type Moving Iron Instruments.pptx
Attraction and Repulsion type Moving Iron Instruments.pptx
 
Lecture_8-Digital implementation of analog controller design.pdf
Lecture_8-Digital implementation of analog controller design.pdfLecture_8-Digital implementation of analog controller design.pdf
Lecture_8-Digital implementation of analog controller design.pdf
 
Electrical shop management system project report.pdf
Electrical shop management system project report.pdfElectrical shop management system project report.pdf
Electrical shop management system project report.pdf
 

SpringOne Platform 2017報告会 メインプロジェクトのアップデート

  • 1. Copyright©2018 NTT corp. All Rights Reserved. 0 1 0 7 2 5 1 02 8
  • 2. Copyright©2018 NTT corp. All Rights Reserved. • • 3 • L FDCa c • ST L FD VC • 56 N L C W • • 0: 56 76 • 0: .2 0: • 06 0615:17
  • 3. Copyright©2018 NTT corp. All Rights Reserved. KFI ? 8 /4 4 D24C ) ? 8 75B? C ( ) ) ? 8 7 ) ) ? 8 1 78?4 ( ) ? 8 4 59 ) ? 8 * ) ? 8 . B D0 59 7C 7 3 C 1 *
  • 4. Copyright©2018 NTT corp. All Rights Reserved. • • • • • • • • •
  • 5. Copyright©2018 NTT corp. All Rights Reserved. 01 2 1 7 5
  • 6. Copyright©2018 NTT corp. All Rights Reserved. • • • • • • • • • •
  • 7. Copyright©2018 NTT corp. All Rights Reserved. . . . 0
  • 8. Copyright©2018 NTT corp. All Rights Reserved. . 0 0 0 . 2 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId> spring-boot-starter-data-mongodb </artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> 0
  • 9. Copyright©2018 NTT corp. All Rights Reserved. 0 2 F <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId> spring-boot-starter-data-mongodb-reactive </artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency> 0 .0 0 : C B A
  • 10. Copyright©2018 NTT corp. All Rights Reserved. • • 01 • 01 1 • • 01 • • 01 • 01 1 • 01 • 01
  • 11. Copyright©2018 NTT corp. All Rights Reserved. • )( ) ) • • • • AAA )( ( )( ) ) 1 1 AAA F E P L HMP R
  • 12. Copyright©2018 NTT corp. All Rights Reserved. - @ A - @ CF @ @ , C A A @ - @ - @ @ A @ CF , - @ A / @ , C @ C A 1 ( )- (22 ( -(2 1 ( )- - @ M IJH
  • 13. Copyright©2018 NTT corp. All Rights Reserved. • )( ) ) • 1 1 1 • 1 • 1 1 1 1 • 1 1 1 1 )( ( )( ) ) 1 1 31 1 1 A 1 1 1 1 1 1 1 1 LT 1 RUM S WH UP 1 1 1 1 1 1 AF FE
  • 14. Copyright©2018 NTT corp. All Rights Reserved. • A • 1 1 • 4 • 4 1 • 4 1 4 ) 1 1 4 1 1 A F H L E ) 4 ) ) (
  • 15. Copyright©2018 NTT corp. All Rights Reserved. • A • - • - : • - A • - : FFF ) A : 0 : / 1 5 A / 1 :. 0: 0 : / 1 A FFF R W / 1 S T ) : ) ) ( h c IH L dg - :5 - A E biea 0 : .0 AE0 0 A 0 :5 A E
  • 16. Copyright©2018 NTT corp. All Rights Reserved. . + <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-webflux</artifactId> </dependency>
  • 17. Copyright©2018 NTT corp. All Rights Reserved. + + B A C $ wget http://localhost:8080 --header='Accept: application/json --2018-01-23 16:05:32-- http://localhost:8080/ Resolving localhost... ::1, 127.0.0.1 Connecting to localhost|::1|:8080... connected. HTTP request sent, awaiting response... 401 Unauthorized Username/Password Authentication Failed. B A C: + + : F
  • 18. Copyright©2018 NTT corp. All Rights Reserved. @Configuration @EnableWebFluxSecurity public class SimpleSecurityConfig{ @Bean public MapReactiveUserDetailsService userDetailsRepository() { UserDetails user = User.withDefaultPasswordEncoder() .username("user") .password("password") .roles("USER") .build(); UserDetails admin = User.withDefaultPasswordEncoder() .username("admin") .password("admin") .roles("ADMIN","USER") .build(); return new MapReactiveUserDetailsService(user, admin); } ( ) S F ( + ) W ) . S :
  • 19. Copyright©2018 NTT corp. All Rights Reserved. @Bean public SecurityWebFilterChain springSecurityFilterChain( ServerHttpSecurity http) { http .authorizeExchange() .pathMatchers("/resources/**").permitAll() .pathMatchers("/login").permitAll() .pathMatchers("/admin").hasRole("ADMIN") .anyExchange().authenticated() .and() .formLogin() .loginPage("/login"); return http.build(); } } + C : + + + + +
  • 20. Copyright©2018 NTT corp. All Rights Reserved. • • 2 0 • 2 0 / 2 • 2 0 • )/ 2 /)/ 2 )/ 2 / / / • ) • 2 / ( 0 • • 2 0 • 2 0 / 2 • 2 0 • 2 0
  • 21. Copyright©2018 NTT corp. All Rights Reserved. • , , , , , , , S K / - NR • C 2 2 B D • D T B • 21 2 • 1 • 2 • - : , , T
  • 22. Copyright©2018 NTT corp. All Rights Reserved. public interface MongoRepository<T,ID> extends PagingAndSortingRepository<T,ID>, QueryByExampleExecutor<T>{ <S extends T> List<S> findAll(Example<S> example); <S extends T> S insert(S entity); // omitted public interface ReactiveMongoRepository<T,ID> extends ReactiveSortingRepository<T,ID>, ReactiveQueryByExampleExecutor<T>{ <S extends T> Flux<S> findAll(Example<S> example); <S extends T> Mono<S> insert(S entity); // omitted
  • 23. Copyright©2018 NTT corp. All Rights Reserved. public class MongoTemplate implements MongoOperations, ApplicationContextAware, IndexOperationsProvider{ public <T> List<T> findAll(Class<T> entityClass) { // omitted public class ReactiveMongoTemplate implements ReactiveMongoOperations, ApplicationContextAware{ public <T> Flux<T> findAll(Class<T> entityClass) { // omitted
  • 24. Copyright©2018 NTT corp. All Rights Reserved. public interface RxJava2CrudRepository<T,ID> extends Repository<T,ID> { <S extends T> Single<S> save(S entity); <S extends T> Flowable<S> saveAll(Iterable<S> entities); Maybe<T> findById(ID id); // omitted
  • 25. Copyright©2018 NTT corp. All Rights Reserved. • ( ) • DR 25 R • C • /D a c • f • f d C C Be R T ( )
  • 26. Copyright©2018 NTT corp. All Rights Reserved. public interface MyReactiveRepository extends ReactiveCrudRepository<Foo,String>{ @Tailable public Flux<Foo> findWithTailableCursorBy(); } @GetMapping(value=”foo", produces="text/event-stream") public Flux<Foo> getFoo(){ return repository.findWithTailableCursorBy(); } +
  • 27. Copyright©2018 NTT corp. All Rights Reserved. + @Autowired ReactiveMongoTemplate template; // omitted @GetMapping(value="foo", produces="text/event-stream") public Flux<Foo> getFoo(){ return template.tail( new BasicQuery(new Document()), Foo.class); }
  • 28. Copyright©2018 NTT corp. All Rights Reserved. 01 2 1 78
  • 29. Copyright©2018 NTT corp. All Rights Reserved. • • • 2 • • • • 2 9 • • 2 • •
  • 30. Copyright©2018 NTT corp. All Rights Reserved. • . . . 02 • 1 3 J OR Wb D @ 0 1 3 1 3 a • D 1 3 M • D @ 2 1 3 1 3 a • ,2.1 2 . 3 3 2 2 . 3 2 2 2 2 . 3 a E . . . 2 0 :
  • 31. Copyright©2018 NTT corp. All Rights Reserved. . 0 . : public class LoggersEndpoint extends AbstractEndpoint<Map<String,Object>> { @Override public Map<String,Object> invoke() { // omitted } public class LoggersMvcEndpoint extends EndpointMvcAdapter{ @ActuatorPostMapping("/{name:.*}") @ResponseBody @HypermediaDisabled public Object set(@PathVariableString name, @RequestBodyMap<String,String> configuration) { // omitted } 2 1
  • 32. Copyright©2018 NTT corp. All Rights Reserved. 2 0. :A A EG @Endpoint(id="loggers") public class LoggersEndpoint { @ReadOperation public Map<String,Object> loggers() { // omitted } @WriteOperation public void configureLogLevel(@Selector String name, @NullableLogLevel configuredLevel) { // omitted } B : B :
  • 33. Copyright©2018 NTT corp. All Rights Reserved. . . . 0 https://micrometer.io
  • 34. Copyright©2018 NTT corp. All Rights Reserved. 2 00 20. 2 2 00 20. 2 B : A M
  • 35. Copyright©2018 NTT corp. All Rights Reserved. + + BE <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> <scope>runtime</scope> </dependency> management.endpoints.web.expose=health,info,prometheus + E
  • 36. Copyright©2018 NTT corp. All Rights Reserved. + / /
  • 37. Copyright©2018 NTT corp. All Rights Reserved. + scrape_configs: - job_name: 'spring-boot2' metrics_path: '/actuator/prometheus' static_configs: - targets: ['localhost:8080']
  • 38. Copyright©2018 NTT corp. All Rights Reserved. +
  • 39. Copyright©2018 NTT corp. All Rights Reserved. + +
  • 40. Copyright©2018 NTT corp. All Rights Reserved. https://micrometer.io/docs/ref/spring/1.5
  • 41. Copyright©2018 NTT corp. All Rights Reserved. • • 12. 00 • 12. 42. • 12. • • 12. 00 • 12. 42. • 4 • 12. • 12.
  • 42. Copyright©2018 NTT corp. All Rights Reserved. • 2 0 • uz N S O 0 2 nrRyil • 5 5. • 50 0 2 5 5 5, 5 5 0 2 nrR l O e • 225 • 4502. , 50 Rp nr • 02 5 • he nr 5 5. 4502. , 50 R a u g Rt s A C 4502. , 50 h h c N nrvo
  • 43. Copyright©2018 NTT corp. All Rights Reserved. . 0 0 A 5 .C R W l S W P l )A D3 1 B 0 A 5 1 B 2 4S l / 5 0 A 5 ) / 5 0 A 5 / 5 0 A 5 ( .)A . 5 hci IOa ( e d b ( hciI
  • 44. Copyright©2018 NTT corp. All Rights Reserved. . 0 1 C B / B e c D y bd D B I5D 2 B B 1 C B 2 B B 4 a 0B D D 1 C B 0B D D 1 C B 0B D D 1 C B ( S / D /A .- DRT sv w D Wk ( uz h uzgn l ( sv w uz T Rt PO SoiW 2AB : 2 B D ( r p ) DDAC) C C 5B D 5 5. 5DC 5 CAB : C B D (B A BD
  • 45. Copyright©2018 NTT corp. All Rights Reserved. <dependencies> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-client</artifactId> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-oauth2-jose</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>
  • 46. Copyright©2018 NTT corp. All Rights Reserved. , , , IF spring.security.oauth2.client: registration: facebook: client-secret: aaaabbbbbccccdddd111122223333 client-id: xxxxxxxxxxxxxxxxx • , / , / IF • O C G D IF H
  • 47. Copyright©2018 NTT corp. All Rights Reserved. spring.security.oauth2.client: registration: XXX: client-secret: abcdefg1234567abcdefg1234567 client-id: xxxxyyyyxxxxyyyy redirect-uri-template: "{baseUrl}/login/oauth2/code/XXX" client-name: XXX client-authentication-method: post authorization-grant-type: authorization_code scope: openid profile provider: XXX: authorization-uri:https://… token-uri:https://… user-info-uri:https://… jwk-set-uri:https://…
  • 48. Copyright©2018 NTT corp. All Rights Reserved.
  • 49. Copyright©2018 NTT corp. All Rights Reserved. • • • 4 • • • • 4 • • 9 • 9 •
  • 50. Copyright©2018 NTT corp. All Rights Reserved. ( ( ( ) public interface CrudRepository<T,ID extends Serializable> extends Repository<T,ID>{ T findOne(ID id); Iterable<T> findAll(); Iterable<T> findAll(Iterable<ID> ids); boolean exists(ID id); public interface CrudRepository<T,ID> extends Repository<T,ID>{ Optional<T> findById(ID id); Iterable<T> findAll(); Iterable<T> findAllById(Iterable<ID> ids); boolean existsById(ID id); ( (
  • 51. Copyright©2018 NTT corp. All Rights Reserved. ( ( ( ( ) public interface CrudRepository<T,ID extends Serializable> extends Repository<T,ID>{ <S extends T> S save(S entity); <S extends T> Iterable<S> save(Iterable<S> entities); public interface CrudRepository<T,ID> extends Repository<T,ID>{ <S extends T> S save(S entity); <S extends T> Iterable<S> saveAll(Iterable<S> entities); ( (
  • 52. Copyright©2018 NTT corp. All Rights Reserved. ( ( ( ) public interface CrudRepository<T,ID extends Serializable> extends Repository<T,ID>{ void delete(ID id); void delete(T entity); void delete(Iterable<? extends T> entities); void deleteAll(); public interface CrudRepository<T,ID> extends Repository<T,ID>{ void deleteById(ID id); void delete(T entity); void deleteAll(Iterable<? extends T> entities); void deleteAll(); ( (
  • 53. Copyright©2018 NTT corp. All Rights Reserved. public interface Custom{ // omitted } public class FooRepositoryImpl implements Custom{ // omitted } public interface FooRepository extends Custom, CrudRepository<Foo,String>{ } : e a C D C SK a C d g Da R I R SK g eD d eD Da C
  • 54. Copyright©2018 NTT corp. All Rights Reserved. public interface Custom{ // omitted } public class CustomImpl implements Custom{ // omitted } public interface FooRepository extends Custom, CrudRepository<Foo,String>{ } : e a C D C SK a C d g Da R I R SK e eD d eD Da C
  • 55. Copyright©2018 NTT corp. All Rights Reserved. public interface Custom{ // omitted } public class CustomImpl implements Custom{ // omitted } public interface FooRepository extends Custom, Custom2, CrudRepository<Foo,String>{ } : i d D I R D K d D g d S S K i i g i Ca e d D
  • 56. Copyright©2018 NTT corp. All Rights Reserved. • • • • • • • • • • • 6 5
  • 57. Copyright©2018 NTT corp. All Rights Reserved. • R S • B . W C / 0B I • 0 .4 . . .4 . . W J C C : . 0 : .
  • 58. Copyright©2018 NTT corp. All Rights Reserved. 0 . 0 @Bean public FlatFileItemReader<Foo> reader(Resource resource) throws Exception{ FlatFileItemReader<Foo> reader = new FlatFileItemReader<>(); reader.setName(“fooReader”); reader.setResource(resource); BeanWrapperFieldSetMapper<Foo>fieldSetMapper= new BeanWrapperFieldSetMapper<>(); fieldSetMapper.setTargetType(Foo.class); fieldSetMapper.afterPropertiesSet(); DelimitedLineTokenizer tokenizer = new DelimitedLineTokenizer(); tokenizer.setNames( new String[] {“first”, “second”, “third”}); tokenizer.afterPropertiesSet(); DefaultLineMapper lineMapper = new DefaultLineMapper(); lineMapper.setLineTokenizer(tokenizer); lineMapper.setFieldSetMapper(fieldSetMapper); reader.setLineMapper(lineMapper); return reader; } 4 3
  • 59. Copyright©2018 NTT corp. All Rights Reserved. . 0 4 @Bean public FlatFileItemReader<Foo> reader(Resource resource) { return new FlatFileItemReaderBuilder<Foo>() .name(“fooReader”) .resource(resource) .delimited() .names(new String[]{“first”, “second”, “third”}) .targetType(Foo.class) .build(); }
  • 60. Copyright©2018 NTT corp. All Rights Reserved. 0 . B : 4 M J :L 4 4 4 4 -0 - 4 -0 6 0 /. -0 6 /.
  • 61. Copyright©2018 NTT corp. All Rights Reserved. 0 . B : 4 M J :L 4 -66 4.1 . 4.1 6 - 4 4 1 -60/ .1 -60/