yasaka
7 years ago
commit
777d06c630
13 changed files with 312 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||
.gradle |
|||
/build/ |
|||
!gradle/wrapper/gradle-wrapper.jar |
|||
|
|||
### STS ### |
|||
.apt_generated |
|||
.classpath |
|||
.factorypath |
|||
.project |
|||
.settings |
|||
.springBeans |
|||
.sts4-cache |
|||
|
|||
### IntelliJ IDEA ### |
|||
.idea |
|||
*.iws |
|||
*.iml |
|||
*.ipr |
|||
/out/ |
|||
|
|||
### NetBeans ### |
|||
/nbproject/private/ |
|||
/build/ |
|||
/nbbuild/ |
|||
/dist/ |
|||
/nbdist/ |
|||
/.nb-gradle/ |
@ -0,0 +1,31 @@ |
|||
subprojects { |
|||
buildscript { |
|||
ext { |
|||
springBootVersion = '2.0.3.RELEASE' |
|||
} |
|||
repositories { |
|||
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } |
|||
mavenCentral() |
|||
} |
|||
dependencies { |
|||
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") |
|||
} |
|||
} |
|||
|
|||
|
|||
apply plugin: 'java' |
|||
apply plugin: 'idea' |
|||
// apply plugin: 'org.springframework.boot' |
|||
// apply plugin: 'io.spring.dependency-management' |
|||
|
|||
sourceCompatibility = 1.8 |
|||
repositories { |
|||
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" } |
|||
mavenCentral() |
|||
} |
|||
|
|||
ext { |
|||
springCloudVersion = 'Finchley.RELEASE' |
|||
} |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
.gradle |
|||
/build/ |
|||
!gradle/wrapper/gradle-wrapper.jar |
|||
|
|||
### STS ### |
|||
.apt_generated |
|||
.classpath |
|||
.factorypath |
|||
.project |
|||
.settings |
|||
.springBeans |
|||
.sts4-cache |
|||
|
|||
### IntelliJ IDEA ### |
|||
.idea |
|||
*.iws |
|||
*.iml |
|||
*.ipr |
|||
/out/ |
|||
|
|||
### NetBeans ### |
|||
/nbproject/private/ |
|||
/build/ |
|||
/nbbuild/ |
|||
/dist/ |
|||
/nbdist/ |
|||
/.nb-gradle/ |
@ -0,0 +1,43 @@ |
|||
buildscript { |
|||
ext { |
|||
springBootVersion = '2.0.3.RELEASE' |
|||
} |
|||
repositories { |
|||
mavenCentral() |
|||
} |
|||
dependencies { |
|||
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") |
|||
} |
|||
} |
|||
|
|||
apply plugin: 'java' |
|||
apply plugin: 'eclipse' |
|||
apply plugin: 'org.springframework.boot' |
|||
apply plugin: 'io.spring.dependency-management' |
|||
|
|||
group = 'com.trgis' |
|||
version = '0.0.1-SNAPSHOT' |
|||
sourceCompatibility = 1.8 |
|||
|
|||
repositories { |
|||
mavenCentral() |
|||
} |
|||
|
|||
|
|||
ext { |
|||
springCloudVersion = 'Finchley.RELEASE' |
|||
} |
|||
|
|||
dependencies { |
|||
compile('org.springframework.cloud:spring-cloud-config-server') |
|||
compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-client') |
|||
compile('org.springframework.boot:spring-boot-starter-security') |
|||
compile('org.springframework.boot:spring-boot-actuator') |
|||
testCompile('org.springframework.boot:spring-boot-starter-test') |
|||
} |
|||
|
|||
dependencyManagement { |
|||
imports { |
|||
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.trgis.sb2sc; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
|||
import org.springframework.cloud.config.server.EnableConfigServer; |
|||
import org.springframework.cloud.netflix.eureka.EnableEurekaClient; |
|||
|
|||
@EnableConfigServer |
|||
@EnableDiscoveryClient |
|||
@EnableEurekaClient |
|||
@SpringBootApplication |
|||
public class Sb2scConfigApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(Sb2scConfigApplication.class, args); |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
server: |
|||
port: 8800 |
|||
spring: |
|||
# security: |
|||
# basic: |
|||
# enabled: true |
|||
# user: |
|||
# name: root |
|||
# password: booszy |
|||
application: |
|||
name: springcloud-config-server |
|||
cloud: |
|||
config: |
|||
server: |
|||
git: |
|||
uri: https://git.coding.net/yirenyishi/springcloud-config-profile |
|||
searchPaths: '{application}' |
|||
eureka: |
|||
client: |
|||
service-url: |
|||
defaultZone: http://root:booszy@localhost:8761/eureka/ |
|||
instance: |
|||
prefer-ip-address: true |
|||
instance-id: ${spring.application.name}:${spring.cloud.client.ipAddress}:${spring.application.instance_id:${server.port}} |
|||
appname: springcloud-config-server |
|||
|
@ -0,0 +1,16 @@ |
|||
package com.trgis.sb2sc; |
|||
|
|||
import org.junit.Test; |
|||
import org.junit.runner.RunWith; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
import org.springframework.test.context.junit4.SpringRunner; |
|||
|
|||
@RunWith(SpringRunner.class) |
|||
@SpringBootTest |
|||
public class Sb2scApplicationTests { |
|||
|
|||
@Test |
|||
public void contextLoads() { |
|||
} |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
.gradle |
|||
/build/ |
|||
!gradle/wrapper/gradle-wrapper.jar |
|||
|
|||
### STS ### |
|||
.apt_generated |
|||
.classpath |
|||
.factorypath |
|||
.project |
|||
.settings |
|||
.springBeans |
|||
.sts4-cache |
|||
|
|||
### IntelliJ IDEA ### |
|||
.idea |
|||
*.iws |
|||
*.iml |
|||
*.ipr |
|||
/out/ |
|||
|
|||
### NetBeans ### |
|||
/nbproject/private/ |
|||
/build/ |
|||
/nbbuild/ |
|||
/dist/ |
|||
/nbdist/ |
|||
/.nb-gradle/ |
@ -0,0 +1,41 @@ |
|||
buildscript { |
|||
ext { |
|||
springBootVersion = '2.0.3.RELEASE' |
|||
} |
|||
repositories { |
|||
mavenCentral() |
|||
} |
|||
dependencies { |
|||
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") |
|||
} |
|||
} |
|||
|
|||
apply plugin: 'java' |
|||
apply plugin: 'eclipse' |
|||
apply plugin: 'org.springframework.boot' |
|||
apply plugin: 'io.spring.dependency-management' |
|||
|
|||
group = 'com.trgis' |
|||
version = '0.0.1-SNAPSHOT' |
|||
sourceCompatibility = 1.8 |
|||
|
|||
repositories { |
|||
mavenCentral() |
|||
} |
|||
|
|||
|
|||
ext { |
|||
springCloudVersion = 'Finchley.RELEASE' |
|||
} |
|||
|
|||
dependencies { |
|||
compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-server') |
|||
compile('org.springframework.boot:spring-boot-starter-security') |
|||
testCompile('org.springframework.boot:spring-boot-starter-test') |
|||
} |
|||
|
|||
dependencyManagement { |
|||
imports { |
|||
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.trgis.sb2sc; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; |
|||
|
|||
@EnableEurekaServer |
|||
@SpringBootApplication |
|||
public class Sb2scEurekaApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(Sb2scEurekaApplication.class, args); |
|||
} |
|||
} |
@ -0,0 +1,24 @@ |
|||
server: |
|||
port: 8761 |
|||
eureka: |
|||
datacenter: trmap |
|||
environment: product |
|||
server: |
|||
# 关闭自我保护 |
|||
enable-self-preservation: false |
|||
# 清理服务器 |
|||
eviction-interval-timer-in-ms: 30000 |
|||
client: |
|||
healthcheck: |
|||
enabled: true |
|||
service-url: |
|||
defaultZone: http://root:booszy@localhost:8761/eureka/ |
|||
register-with-eureka: false |
|||
fetch-registry: false |
|||
spring: |
|||
security: |
|||
basic: |
|||
enabled: true |
|||
user: |
|||
name: root |
|||
password: booszy |
@ -0,0 +1,16 @@ |
|||
package com.trgis.sb2sc; |
|||
|
|||
import org.junit.Test; |
|||
import org.junit.runner.RunWith; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
import org.springframework.test.context.junit4.SpringRunner; |
|||
|
|||
@RunWith(SpringRunner.class) |
|||
@SpringBootTest |
|||
public class Sb2scApplicationTests { |
|||
|
|||
@Test |
|||
public void contextLoads() { |
|||
} |
|||
|
|||
} |
@ -0,0 +1,2 @@ |
|||
rootProject.name = 'sb2sc' |
|||
include('sc-eureka','sc-config') |
Loading…
Reference in new issue