Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

API 카테고리는 API를 그룹화 하여 관리하기 위해서 사용하며, 하위 API에 대한 공통 설정을 정의할 수 있다.

...

Info

{{protocol}}://{{hostname}}:{{port}}/{{apiType}}/{{apiCategory}}/{{api}}

API Category는 다음과 같은 속성을 정의한다.

...

Expand

apiCategory

  • "video" 추가

Code Block
languagejson
"fileUrlFormat": {
      "default": "{{:getEnvValue(core.cluster.api-url-prefix, url)}}",
      "video": "{{:getEnvValue(core.cluster.wowza-url-prefix, url)}}"
}

application.yml

  • core.cluster.wowza-url-prefix 설정

Code Block
languageyaml
core:
  project: sbdc
  internal-port: 8080
  session-timeout: 30m
  single-http-connector: true
  cluster:
    api-url-prefix: http://dev-core.justten.io/
    front-url-prefix: http://dev-builder.justten.io/
    wowza-url-prefix: https://vod.justten.io/vod_stg/_definst_/%s/playlist.m3u8
    mode: all
    default-service-group: all
    members: 192.1.1.110

propertyType.json

  • "fileHandler": "video", 설정

Code Block
languagejson
{
  "pid": "fileValue",
  "name": "파일",
  "valueType": "FILE",
  "required": true,
  "idable": false,
  "labelable": true,
  "treeable": false,
  "indexable": true,
  "analyzer": "simple",
  "fileHandler": "video",
  "referenceType": "",
  "referenceValue": "",
  "orderNo": 30
}

VideoFileRepository.java

  • FileRepository 추가. implements FileRepository

  • 명명규칙

    • {{fileHandler}}FileRepository.java

API Response :

mainImageFile 는 default fileHandler

fileValue 는 video fileHandler

Code Block
languagejson
{
	"mainImageFile": "http://dev-core.justten.io/imageResource/fileValue/202007/17/48195194-c6e5-4a86-a7e4-a3e61b777032.png",
	"fileValue": "https://vod.justten.io/vod/_definst_/videoResource/fileValue/202003/25/21c90041-95eb-406f-8a2b-5e15ef4bc6dd.mp4/playlist.m3u8"
}

...