본문 바로가기

Eng words

2020/04/19 Eng Words

Spring bean

일반적으로 .xml 파일에 정의

속성 : class, id, scope(객체의 범위)

WAS

Web Application Server.

내장 WAS: 내부에서WAS실행 ->톰캣 설치필요 X

스프링부트로 만들어진 jar(실행가능한 java 패키징 파일)파일로 실행

@RestController

JSON을 반환하는 컨트롤러를 만듬

@GetMapping

HTTP Method Get요청을 받을  있는API 만듬

API

프로그램과 프로그램을 연결해주는 다리Application Programming Interface

@RunWith(SpringRunner.class)

Test진행할 때 여기서는 SpringRunner라는스프링 실행자 사용

@WebMvcTest

여러 스프링 테스트Annotation Web 집중할  있는Annotation.

@Autowired

스프링을 관리하는 빈에 의존성 주입을 받습니다.(단하나의 생성자를 통해)

Private MockMvc mvc

 API테스트 할때 사용합니다.

Mvc.perform(get("/hello"))

MockMvc를 통해/hello 주소로 HTTP GET요청을 합니다

.andExpert(status().isOK())

Mvc.perform의 결과를검증합니다

.andExpert(content().string(hello))

Mvc.perform의 결과를검증합니다

JSON

마크업 도구 (.xml) JavaScript Object Notation. 

Specification

설명서, 사양

'Eng words' 카테고리의 다른 글

2020/04/22 Eng Words  (0) 2020.04.22
2020/04/20 Eng Words  (0) 2020.04.20
2020/04/18 Eng Words  (0) 2020.04.18
2020/04/14 Eng Words  (0) 2020.04.14
2020/04/13 Eng Words  (0) 2020.04.13