forked from fp2952/spring-cloud-base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
409 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
spring: | ||
application: | ||
name: api-gateway | ||
profiles: | ||
active: dev | ||
cloud: | ||
consul: | ||
host: ${CONSUL_HOST:localhost} | ||
port: ${CONSUL_PORT:8500} | ||
discovery: | ||
prefer-ip-address: true | ||
config: | ||
fail-fast: true | ||
discovery: | ||
service-id: config-server | ||
enabled: true | ||
profile: ${spring.profiles.active} | ||
label: ${spring.profiles.active} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
auth-center/auth-center-provider/src/main/resources/bootstrap.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
spring: | ||
application: | ||
name: auth-center | ||
profiles: | ||
active: dev | ||
cloud: | ||
consul: | ||
host: ${CONSUL_HOST:localhost} | ||
port: ${CONSUL_PORT:8500} | ||
discovery: | ||
prefer-ip-address: true | ||
health-check-path: ${server.context-path}/health | ||
tags: management.context-path=${server.context-path} | ||
config: | ||
fail-fast: true | ||
discovery: | ||
service-id: config-server | ||
enabled: true | ||
profile: ${spring.profiles.active} | ||
label: ${spring.profiles.active} | ||
|
||
server: | ||
context-path: /auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
config-git/src/main/java/com/peng/config/git/ConfigServerApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.peng.config.git; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.cloud.client.SpringCloudApplication; | ||
import org.springframework.cloud.config.server.EnableConfigServer; | ||
|
||
/** | ||
* Created by fp295 on 2018/6/29. | ||
*/ | ||
@EnableConfigServer | ||
@SpringCloudApplication | ||
public class ConfigServerApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(ConfigServerApplication.class, args); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
server: | ||
port: 18006 | ||
|
||
spring: | ||
application: | ||
name: config-server | ||
profiles: | ||
active: native | ||
cloud: | ||
consul: | ||
host: ${CONSUL_HOST:localhost} | ||
port: ${CONSUL_PORT:8500} | ||
discovery: | ||
prefer-ip-address: true | ||
|
||
--- | ||
spring: | ||
profiles: native | ||
cloud: | ||
config: | ||
server: | ||
native: | ||
search-locations: classpath:/config/ | ||
fail-fast: true | ||
|
||
--- | ||
spring: | ||
profiles: prd | ||
cloud: | ||
config: | ||
server: | ||
git: | ||
uri: https://github.com/ityouknow/spring-cloud-starter/ # 配置git仓库的地址 | ||
search-paths: config-repo # git仓库地址下的相对地址,可以配置多个,用,分割。 | ||
username: # git仓库的账号 | ||
password: # git仓库的密码 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
server: | ||
tomcat: | ||
max-threads: 500 # Maximum amount of worker threads. | ||
min-spare-threads: 50 # Minimum amount of worker threads | ||
|
||
|
||
#监控短点配置 | ||
management: | ||
security: | ||
enabled: false | ||
info: | ||
git: | ||
mode: full | ||
endpoints: | ||
actuator: | ||
enabled: true | ||
shutdown: | ||
enabled: false | ||
info: | ||
version: @project.version@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
server: | ||
port: 18004 | ||
|
||
spring: | ||
rabbitmq: | ||
host: localhost | ||
port: 5672 | ||
username: fangp | ||
password: '000000' | ||
|
||
logging: | ||
file: logs/mc-service.log |
Oops, something went wrong.