2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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 * ============LICENSE_END=========================================================
18 package org.onap.dcae.runtime.web.configuration;
20 import org.onap.dcae.runtime.web.models.DashboardConfig;
21 import org.springframework.beans.factory.annotation.Autowired;
22 import org.springframework.beans.factory.annotation.Value;
23 import org.springframework.context.annotation.Bean;
24 import org.springframework.context.annotation.Configuration;
25 import org.springframework.core.env.Environment;
28 public class PropertyConfig {
33 @Value("${dashboard.url}")
36 @Value("${dashboard.username}")
39 @Value("${dashboard.password}")
40 String dashboardPassword;
43 public DashboardConfig getDashboardConfig(){
44 DashboardConfig dashboardConfig = new DashboardConfig();
45 dashboardConfig.setUrl(this.dashboardUrl);
46 dashboardConfig.setUsername(this.dashboardUser);
47 dashboardConfig.setPassword(this.dashboardPassword);
48 return dashboardConfig;