본문 바로가기

Spring/Spring Web MVC

URI 패턴

반응형

https://stackoverflow.com/questions/176264/what-is-the-difference-between-a-uri-a-url-and-a-urn

 

What is the difference between a URI, a URL and a URN?

People talk about URLs, URIs, and URNs as if they're different things, but they look the same to the naked eye. What are the distinguishable differences between them?

stackoverflow.com

URI 벤다이어그램

URI -- Uniform Resource Identifier

URIs are a standard for identifying documents using a short string of numbers, letters, and symbols. They are defined by RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax. URLs, URNs, and URCs are all types of URI.

URI는 짧은 문자열의 숫자, 문자 및 기호를 사용하여 문서를 식별하기 위한 표준입니다. RFC 3986 - URI(Uniform Resource Identifier): 일반 구문에 의해 정의됩니다. URL, URN 및 URC는 모두 URI 유형입니다.

URL -- Uniform Resource Locator

Contains information about how to fetch a resource from its location. For example:

리소스를 해당 경로에서 가져오는 방법에 대한 정보를 가지고 있습니다. 예를 들어...

URLs always start with a protocol (http) and usually contain information such as the network host name (example.com) and often a document path (/foo/mypage.html). URLs may have query parameters and fragment identifiers.

URL은 항상 프로토콜(프로토콜)로 시작하며 일반적으로 네트워크 호스트 이름(example.com)과 문서 경로(/foo/mypage.contract)와 같은 정보를 포함합니다. URL에는 쿼리 파라미터와 식별자가 있을 수 있습니다.

사실 URN은 몰라도 된다...

URN -- Uniform Resource Name

Identifies a resource by a unique and persistent name, but doesn't necessarily tell you how to locate it on the internet. It usually starts with the prefix urn: For example:

  • urn:isbn:0451450523 to identify a book by its ISBN number.
  • urn:uuid:6e8bc430-9c3a-11d9-9669-0800200c9a66 a globally unique identifier
  • urn:publishing:book - An XML namespace that identifies the document as a type of book.

URNs can identify ideas and concepts. They are not restricted to identifying documents. When a URN does represent a document, it can be translated into a URL by a "resolver". The document can then be downloaded from the URL.

반응형

'Spring > Spring Web MVC' 카테고리의 다른 글

HttpMessageConverters  (0) 2021.03.28
ResponseEntity란?  (0) 2021.03.28
Spring RestTemplate  (0) 2021.02.25
RESTful API  (0) 2021.02.25
서블릿 리스너와 필터  (3) 2020.12.30