|  |  |  | @ -5,11 +5,21 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | 
			
		
	
		
			
				
					|  |  |  |  | import org.springframework.cloud.config.server.EnableConfigServer; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | // 表明这是一个Spring Boot应用的主配置类,它整合了多个Spring Boot相关的配置功能,
 | 
			
		
	
		
			
				
					|  |  |  |  | // 例如自动配置、组件扫描等,能够让Spring Boot应用顺利启动并运行。
 | 
			
		
	
		
			
				
					|  |  |  |  | @SpringBootApplication | 
			
		
	
		
			
				
					|  |  |  |  | // 用于启用服务发现客户端功能,使得该应用可以注册到服务注册中心(比如Eureka等),
 | 
			
		
	
		
			
				
					|  |  |  |  | // 并且能够发现注册中心中其他已注册的服务,方便服务间的调用和协作。
 | 
			
		
	
		
			
				
					|  |  |  |  | @EnableDiscoveryClient | 
			
		
	
		
			
				
					|  |  |  |  | // 开启配置服务器功能,该应用能够作为配置中心服务器,对外提供配置信息的管理与服务,
 | 
			
		
	
		
			
				
					|  |  |  |  | // 其他微服务可以从这个配置服务器获取相应的配置内容,实现配置的集中管理和动态更新等。
 | 
			
		
	
		
			
				
					|  |  |  |  | @EnableConfigServer | 
			
		
	
		
			
				
					|  |  |  |  | public class SnailmallConfigServerApplication { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     // 这是Java应用程序的入口方法,Java虚拟机(JVM)会从这里开始执行程序。
 | 
			
		
	
		
			
				
					|  |  |  |  |     // 它接收命令行传入的参数args,通过SpringApplication的run方法启动Spring Boot应用,
 | 
			
		
	
		
			
				
					|  |  |  |  |     // 传入的参数包括当前应用的主类(SnailmallConfigServerApplication.class)以及命令行参数args,
 | 
			
		
	
		
			
				
					|  |  |  |  |     // 以此启动整个Spring Boot应用的运行环境并加载相关配置进行初始化等操作。
 | 
			
		
	
		
			
				
					|  |  |  |  |     public static void main(String[] args) { | 
			
		
	
		
			
				
					|  |  |  |  |         SpringApplication.run(SnailmallConfigServerApplication.class, args); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |