Add property to enable Notification Sevice async processing
[cps.git] / cps-application / src / main / resources / application.yml
1 #  ============LICENSE_START=======================================================\r
2 #  Copyright (C) 2021 Pantheon.tech\r
3 #  Modifications Copyright (C) 2021 Bell Canada\r
4 #  Modifications Copyright (C) 2021 Nordix Foundation\r
5 #  ================================================================================\r
6 #  Licensed under the Apache License, Version 2.0 (the "License");\r
7 #  you may not use this file except in compliance with the License.\r
8 #  You may obtain a copy of the License at\r
9 #\r
10 #        http://www.apache.org/licenses/LICENSE-2.0\r
11 #\r
12 #  Unless required by applicable law or agreed to in writing, software\r
13 #  distributed under the License is distributed on an "AS IS" BASIS,\r
14 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
15 #  See the License for the specific language governing permissions and\r
16 #  limitations under the License.\r
17 #\r
18 #  SPDX-License-Identifier: Apache-2.0\r
19 #  ============LICENSE_END=========================================================\r
20 \r
21 server:\r
22     port: 8080\r
23 \r
24 rest:\r
25     api:\r
26         cps-base-path: /cps/api\r
27         ncmp-base-path: /ncmp\r
28 \r
29 spring:\r
30     main:\r
31         banner-mode: "off"\r
32     jpa:\r
33         ddl-auto: create\r
34         open-in-view: false\r
35         properties:\r
36             hibernate:\r
37                 enable_lazy_load_no_trans: true\r
38                 dialect: org.hibernate.dialect.PostgreSQLDialect\r
39 \r
40     datasource:\r
41         url: jdbc:postgresql://${DB_HOST}:5432/cpsdb\r
42         username: ${DB_USERNAME}\r
43         password: ${DB_PASSWORD}\r
44         driverClassName: org.postgresql.Driver\r
45         initialization-mode: always\r
46 \r
47     cache:\r
48         type: caffeine\r
49         cache-names: yangSchema\r
50         caffeine:\r
51             spec: maximumSize=10000,expireAfterAccess=10m\r
52 \r
53     liquibase:\r
54         change-log: classpath:changelog/changelog-master.yaml\r
55         labels: ${LIQUIBASE_LABELS}\r
56 \r
57     servlet:\r
58         multipart:\r
59             enabled: true\r
60             max-file-size: 100MB\r
61             max-request-size: 100MB\r
62 \r
63     kafka:\r
64         bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092}\r
65         security:\r
66             protocol: PLAINTEXT\r
67         producer:\r
68             value-serializer: org.springframework.kafka.support.serializer.JsonSerializer\r
69             client-id: cps-core\r
70 \r
71 notification:\r
72     data-updated:\r
73         enabled: false\r
74         topic: ${CPS_CHANGE_EVENT_TOPIC:cps.data-updated-events}\r
75         filters:\r
76             enabled-dataspaces: ${NOTIFICATION_DATASPACE_FILTER_PATTERNS:""}\r
77     async:\r
78         enabled: false\r
79         executor:\r
80             core-pool-size: 2\r
81             max-pool-size: 10\r
82             queue-capacity: 500\r
83             wait-for-tasks-to-complete-on-shutdown: true\r
84             thread-name-prefix: Async-\r
85 \r
86 \r
87 springdoc:\r
88     swagger-ui:\r
89         disable-swagger-default-url: true\r
90         urlsPrimaryName: cps-core\r
91         urls:\r
92             - name: cps-core\r
93               url: /api-docs/cps-core/openapi.yaml\r
94             - name: cps-ncmp\r
95               url: /api-docs/cps-ncmp/openapi.yaml\r
96 \r
97 security:\r
98     # comma-separated uri patterns which do not require authorization\r
99     permit-uri: /manage/**,/swagger-ui/**,/swagger-resources/**,/api-docs\r
100     auth:\r
101         username: ${CPS_USERNAME}\r
102         password: ${CPS_PASSWORD}\r
103 \r
104 # Actuator\r
105 management:\r
106     server:\r
107         port: 8081\r
108     endpoints:\r
109         web:\r
110             base-path: /manage\r
111             exposure:\r
112                 include: info,health,loggers,prometheus\r
113     endpoint:\r
114         health:\r
115             show-details: always\r
116             # kubernetes probes: liveness and readiness\r
117             probes:\r
118                 enabled: true\r
119 \r
120 logging:\r
121     level:\r
122         org:\r
123             springframework: INFO\r
124 \r
125 dmi:\r
126     auth:\r
127         username: ${DMI_USERNAME}\r
128         password: ${DMI_PASSWORD}\r