Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
map-parent
Commits
fc809ff2
Commit
fc809ff2
authored
Apr 21, 2021
by
chentian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加people以人模块
parent
80431fc7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
0 deletions
+65
-0
serviceapi/peopleapi/pom.xml
+18
-0
serviceapi/peopleapi/src/main/java/com/founder/peopleapi/PeopleApiApplication.java
+27
-0
serviceapi/peopleapi/src/main/resources/bootstrap.properties
+20
-0
No files found.
serviceapi/peopleapi/pom.xml
0 → 100644
View file @
fc809ff2
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
serviceapi
</artifactId>
<groupId>
com.founder
</groupId>
<version>
0.0.1-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
peopleapi
</artifactId>
<build>
<finalName>
peopleapi
</finalName>
</build>
</project>
\ No newline at end of file
serviceapi/peopleapi/src/main/java/com/founder/peopleapi/PeopleApiApplication.java
0 → 100644
View file @
fc809ff2
package
com
.
founder
.
peopleapi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.boot.web.client.RestTemplateBuilder
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.web.client.RestTemplate
;
@SpringBootApplication
(
exclude
=
DataSourceAutoConfiguration
.
class
)
//排除自动配置
@ComponentScan
(
basePackages
=
{
"com.founder"
})
@EnableDiscoveryClient
public
class
PeopleApiApplication
{
@Autowired
private
RestTemplateBuilder
restTemplateBuilder
;
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
PeopleApiApplication
.
class
,
args
);
}
@Bean
public
RestTemplate
restTemplate
(){
return
restTemplateBuilder
.
build
();}
}
serviceapi/peopleapi/src/main/resources/bootstrap.properties
0 → 100644
View file @
fc809ff2
#配置中心地址
spring.cloud.nacos.config.server-addr
=
47.92.48.137:8848
spring.cloud.nacos.discovery.server-addr
=
47.92.48.137:8848
#spring.cloud.nacos.config.server-addr=26.3.13.184:8848
#spring.cloud.nacos.discovery.server-addr=26.3.13.184:8848
spring.profiles.active
=
dev
# 该配置影响统一配置中心中的dataId
spring.application.name
=
peopleapi
spring.cloud.nacos.config.namespace
=
dev
#spring.cloud.nacos.config.ext-config[0].data-id=image.properties
# 开启动态刷新配置,否则配置文件修改,工程无法感知
#spring.cloud.nacos.config.ext-config[0].refresh=true
#spring.cloud.nacos.config.shared-dataids=imageapipz.properties
#
spring.cloud.nacos.config.refreshable-dataids
=
imageapipz.properties
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment