添加以下参数(二选一即可) 
 -Dspring.profiles.active=test -Dserver.port=8081
# 或
spring.profiles.active=test;server.port=8081
复制代码 
 2、启动时添加参数 
 对应上面的参数在启动jar包是添加参数 
  
   第一种 java -jar -Dspring.profiles.active=t...
                            
                            
                            
                            
                            
                                阅读全文
                            
                         Spring
                            
                          				 		Spring
                         
                                         
                                         
                                         
                                         
                                         
                                         
                                         
                                         
                             
                             
                             
                             
                             
                             
                            
![[HBLOG]公众号](https://www.liuhaihua.cn/img/qrcode_gzh.jpg) 
						