// Path: modules/cloud-portal-server/src/main/java/de/papke/cloud/portal/pojo/Menu.java
// public class Menu {
// 
// 	private String title;
// 	private String path;
// 	private String icon;
// 	private boolean secure;
// 	private List<Menu> menus;
// 	
// 	public String getTitle() {
// 		return title;
// 	}
// 	public void setTitle(String title) {
// 		this.title = title;
// 	}
// 	public String getPath() {
// 		return path;
// 	}
// 	public void setPath(String path) {
// 		this.path = path;
// 	}
// 	public String getIcon() {
// 		return icon;
// 	}
// 	public void setIcon(String icon) {
// 		this.icon = icon;
// 	}
// 	public boolean isSecure() {
// 		return secure;
// 	}
// 	public void setSecure(boolean secure) {
// 		this.secure = secure;
// 	}
// 	public List<Menu> getMenus() {
// 		return menus;
// 	}
// 	public void setMenus(List<Menu> menus) {
// 		this.menus = menus;
// 	}
// }


import java.io.InputStream;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.yaml.snakeyaml.Yaml;
import de.papke.cloud.portal.pojo.Menu;
package de.papke.cloud.portal.service;





@Service
public class MenuService {

	private static final String MENU_CONFIG_FILE_PATH = "/menu/structure.yml";

	private static final Logger LOG = LoggerFactory.getLogger(MenuService.class); 

	private Menu menu;
	
	@PostConstruct
	public void init() {

		try {
			Yaml yaml = new Yaml();
			InputStream inputStream = this.getClass().getResourceAsStream(MENU_CONFIG_FILE_PATH);
// Path: modules/cloud-portal-server/src/main/java/de/papke/cloud/portal/pojo/Menu.java
// public class Menu {
// 
// 	private String title;
// 	private String path;
// 	private String icon;
// 	private boolean secure;
// 	private List<Menu> menus;
// 	
// 	public String getTitle() {
// 		return title;
// 	}
// 	public void setTitle(String title) {
// 		this.title = title;
// 	}
// 	public String getPath() {
// 		return path;
// 	}
// 	public void setPath(String path) {
// 		this.path = path;
// 	}
// 	public String getIcon() {
// 		return icon;
// 	}
// 	public void setIcon(String icon) {
// 		this.icon = icon;
// 	}
// 	public boolean isSecure() {
// 		return secure;
// 	}
// 	public void setSecure(boolean secure) {
// 		this.secure = secure;
// 	}
// 	public List<Menu> getMenus() {
// 		return menus;
// 	}
// 	public void setMenus(List<Menu> menus) {
// 		this.menus = menus;
// 	}
// }


// Path: modules/cloud-portal-server/src/main/java/de/papke/cloud/portal/service/MenuService.java
import java.io.InputStream;
import javax.annotation.PostConstruct;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.yaml.snakeyaml.Yaml;
import de.papke.cloud.portal.pojo.Menu;

package de.papke.cloud.portal.service;





@Service
public class MenuService {

	private static final String MENU_CONFIG_FILE_PATH = "/menu/structure.yml";

	private static final Logger LOG = LoggerFactory.getLogger(MenuService.class); 

	private Menu menu;
	
	@PostConstruct
	public void init() {

		try {
			Yaml yaml = new Yaml();
			InputStream inputStream = this.getClass().getResourceAsStream(MENU_CONFIG_FILE_PATH);
			menu = yaml.loadAs(inputStream, Menu.class);