package nju.seec.SEECdemo.util; import nju.seec.SEECdemo.data.entity.resource.ResourceConfig; import nju.seec.SEECdemo.logic.vo.projecttemplate.ProjectTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; @Component public class BeanUtil { /** * 软工二的项目模板 * @return */ @Bean public ProjectTemplate seecIITemplate() { ProjectTemplate projectTemplate = new ProjectTemplate(); ResourceConfig resourceConfig = new ResourceConfig(); resourceConfig.setDefaultCPU(5); resourceConfig.setMaxCPU(10); resourceConfig.setMinCPU(5); resourceConfig.setDefaultMemory(100); resourceConfig.setMaxMemory(500); resourceConfig.setMinMemory(100); resourceConfig.setDefaultStorage(0); resourceConfig.setMaxStorage(1000); projectTemplate.setDefaultResourceConfig(resourceConfig); projectTemplate.setName("软工二大作业"); projectTemplate.setDescription("部署单个应用到部署空间下,应用集中连接唯一的数据库"); return projectTemplate; } }