Commit fc809ff2 by chentian

增加people以人模块

parent 80431fc7
<?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
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();}
}
#配置中心地址
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment