| 
						
						
							
								
							
						
						
					 | 
					@ -11,6 +11,9 @@ import org.springframework.core.env.Environment; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 * @date 2020-07-03 11:14 | 
					 | 
					 | 
					 * @date 2020-07-03 11:14 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 **/ | 
					 | 
					 | 
					 **/ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					public enum EnvEnum { | 
					 | 
					 | 
					public enum EnvEnum { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						/** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						 * 环境变量枚举 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						 */ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						LOCAL("local", "本地环境", "http://localhost:8080/api/"), | 
					 | 
					 | 
						LOCAL("local", "本地环境", "http://localhost:8080/api/"), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						DEV("dev", "开发环境", "http://192.168.1.130:8080/api/"), | 
					 | 
					 | 
						DEV("dev", "开发环境", "http://192.168.1.130:8080/api/"), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						TEST("test", "体验环境", "https://epmet-dev.elinkservice.cn/api/"), | 
					 | 
					 | 
						TEST("test", "体验环境", "https://epmet-dev.elinkservice.cn/api/"), | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -44,7 +47,7 @@ public enum EnvEnum { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							try { | 
					 | 
					 | 
							try { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								Environment environment = SpringContextUtils.getBean(Environment.class); | 
					 | 
					 | 
								Environment environment = SpringContextUtils.getBean(Environment.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								String[] activeProfiles = environment.getActiveProfiles(); | 
					 | 
					 | 
								String[] activeProfiles = environment.getActiveProfiles(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
								if (activeProfiles != null && activeProfiles.length > 0) { | 
					 | 
					 | 
								if (activeProfiles.length > 0) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
									return getEnum(activeProfiles[0]); | 
					 | 
					 | 
									return getEnum(activeProfiles[0]); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								} | 
					 | 
					 | 
								} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} catch (Exception e) { | 
					 | 
					 | 
							} catch (Exception e) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |