您好,登錄后才能下訂單哦!
/**
* AdSearchApplication for 廣告搜索服務啟動類
*
* @author <a href="mailto:magicianisaac@gmail.com">Isaac.Zhang | 若初</a>
*/
@EnableFeignClients //啟動Feign 客戶端,為了訪問其他微服務
@EnableDiscoveryClient // 開啟服務發現組件,在這里等同于 @EnableEurekaClient
@EnableHystrix // 開啟hystrix 斷路器
@EnableCircuitBreaker // 斷路器
@EnableHystrixDashboard // 開啟hystrix 監控
@SpringBootApplication
public class AdSearchApplication {
public static void main(String[] args) {
SpringApplication.run(AdSearchApplication.class, args);
}
}
server:
port: 7001
servlet:
context-path: /ad-search #http請求的根路徑(請求前綴,在handle的mapping之前,需要127.0.0.1/ad-search/XXXX)
spring:
application:
name: mscx-ad-search
jpa:
show-sql: true #執行時是否打印sql語句,方便調試
hibernate:
ddl-auto: none
properties:
hibernate.format_sql: true
open-in-view: false #控制是否在懶加載時,有可能會找不到bean報錯
datasource:
username: root
url: jdbc:mysql://127.0.0.1:3306/advertisement?useSSL=false&autoReconnect=true
password: ****
tomcat:
max-active: 4 #最大連接數
min-idle: 2 #最小空閑連接數
initial-size: 2 #默認初始化連接數
eureka:
client:
service-url:
defaultZone: http://server1:7777/eureka/,http://server2:8888/eureka/,http://server3:9999/eureka/
feign:
hystrix:
enabled: true
management:
endpoints:
web:
exposure:
include: "*"
adconf:
mysql:
host: 127.0.0.1
port: 3306
username: root
password: ****
binlogName: ""
position: -1
kafka:
topic: ad-search-mysql-data
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。