/**
* AdSearchApplication for 廣告搜索服務(wù)啟動(dòng)類(lèi)
*
* @author <a href="mailto:magicianisaac@gmail.com">Isaac.Zhang | 若初</a>
*/
@EnableFeignClients //啟動(dòng)Feign 客戶端,為了訪問(wèn)其他微服務(wù)
@EnableDiscoveryClient // 開(kāi)啟服務(wù)發(fā)現(xiàn)組件,在這里等同于 @EnableEurekaClient
@EnableHystrix // 開(kāi)啟hystrix 斷路器
@EnableCircuitBreaker // 斷路器
@EnableHystrixDashboard // 開(kāi)啟hystrix 監(jiān)控
@SpringBootApplication
public class AdSearchApplication {
public static void main(String[] args) {
SpringApplication.run(AdSearchApplication.class, args);
}
}
server:
port: 7001
servlet:
context-path: /ad-search #http請(qǐng)求的根路徑(請(qǐng)求前綴,在handle的mapping之前,需要127.0.0.1/ad-search/XXXX)
spring:
application:
name: mscx-ad-search
jpa:
show-sql: true #執(zhí)行時(shí)是否打印sql語(yǔ)句,方便調(diào)試
hibernate:
ddl-auto: none
properties:
hibernate.format_sql: true
open-in-view: false #控制是否在懶加載時(shí),有可能會(huì)找不到bean報(bào)錯(cuò)
datasource:
username: root
url: jdbc:MySQL://127.0.0.1:3306/advertisement?useSSL=false&autoReconnect=true
password: ****
tomcat:
max-active: 4 #最大連接數(shù)
min-idle: 2 #最小空閑連接數(shù)
initial-size: 2 #默認(rèn)初始化連接數(shù)
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
當(dāng)前名稱:[Springcloud一步步實(shí)現(xiàn)廣告系統(tǒng)]9.主類(lèi)和配置文件
當(dāng)前URL:http://aaarwkj.com/article26/iggocg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計(jì)、外貿(mào)建站、網(wǎng)站內(nèi)鏈、網(wǎng)站設(shè)計(jì)公司、電子商務(wù)、搜索引擎優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)