Config配置中心配置完成
This commit is contained in:
		@@ -12,7 +12,6 @@ import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
 | 
			
		||||
 * @Create 2023/8/14 16:23
 | 
			
		||||
 */
 | 
			
		||||
@SpringBootApplication
 | 
			
		||||
@EnableEurekaClient
 | 
			
		||||
public class BookApplication {
 | 
			
		||||
    public static void main(String[] args) {
 | 
			
		||||
        SpringApplication.run(BookApplication.class,args);
 | 
			
		||||
 
 | 
			
		||||
@@ -3,11 +3,6 @@ server:
 | 
			
		||||
spring:
 | 
			
		||||
  application:
 | 
			
		||||
    name: bookservice
 | 
			
		||||
  datasource:
 | 
			
		||||
    driver-class-name: com.mysql.cj.jdbc.Driver
 | 
			
		||||
    url: jdbc:mysql://43.143.164.194:3306/mac
 | 
			
		||||
    username: mac
 | 
			
		||||
    password: mactest
 | 
			
		||||
eureka:
 | 
			
		||||
  client:
 | 
			
		||||
    serviceUrl:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								book-service/src/main/resources/bootstrap.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								book-service/src/main/resources/bootstrap.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
spring:
 | 
			
		||||
  cloud:
 | 
			
		||||
    config:
 | 
			
		||||
      # 名称,其实就是文件名称
 | 
			
		||||
      name: bookservice
 | 
			
		||||
      # 配置服务器的地址
 | 
			
		||||
      uri: http://localhost:8700
 | 
			
		||||
      # 环境
 | 
			
		||||
      profile: prod
 | 
			
		||||
      # 分支
 | 
			
		||||
      label: master
 | 
			
		||||
		Reference in New Issue
	
	Block a user