41eddf84730a72e531ead4d0860d5908a47e3f0c
[cps/cps-temporal.git] / src / main / resources / application.yml
1 # ============LICENSE_START=======================================================
2 # Copyright (c) 2021 Bell Canada.
3 # Modifications Copyright (C) 2021 Nordix Foundation.
4 # ================================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
19
20 server:
21     port: 8080
22
23 rest:
24     api:
25         base-path: /cps-temporal/api
26
27 spring:
28     datasource:
29         url: jdbc:postgresql://${DB_HOST}:${DB_PORT}/cpstemporaldb
30         username: ${DB_USERNAME}
31         password: ${DB_PASSWORD}
32     liquibase:
33         change-log: classpath:/db/changelog/changelog-master.xml
34     jpa:
35         open-in-view: false
36         properties:
37             hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
38             hibernate.format_sql: true
39             hibernate.generate_statistics: false
40     kafka:
41         bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER}
42         security:
43             protocol: PLAINTEXT
44         consumer:
45             group-id: ${KAFKA_CONSUMER_GROUP_ID:cps-temporal-group}
46             # Configures the Spring Kafka ErrorHandlingDeserializer that delegates to the 'real' deserializers
47             # See https://docs.spring.io/spring-kafka/docs/2.5.11.RELEASE/reference/html/#error-handling-deserializer
48             # and https://www.confluent.io/blog/spring-kafka-can-your-kafka-consumers-handle-a-poison-pill/
49             key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
50             value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
51             properties:
52                 spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer
53                 spring.deserializer.value.delegate.class: org.springframework.kafka.support.serializer.JsonDeserializer
54                 spring.json.value.default.type: org.onap.cps.event.model.CpsDataUpdatedEvent
55
56 app:
57     listener:
58         data-updated:
59             topic: ${CPS_CHANGE_EVENT_TOPIC:cps.cfg-state-events}
60     query:
61         response:
62             max-page-size: 10000
63
64 springdoc:
65     swagger-ui:
66         disable-swagger-default-url: true
67         urlsPrimaryName: query
68         urls:
69             - name: query
70               url: /swagger/openapi.yml
71
72 # Actuator
73 management:
74     server:
75         port: 8081
76     endpoints:
77         web:
78             base-path: /manage
79             exposure:
80                 include: info,health,loggers,prometheus
81     endpoint:
82         health:
83             show-details: always
84             # kubernetes probes: liveness and readiness
85             probes:
86                 enabled: true