@@ -3,6 +3,7 @@ package com.telpo.dipperposition; | |||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.springframework.boot.SpringApplication; | import org.springframework.boot.SpringApplication; | ||||
import org.springframework.boot.autoconfigure.SpringBootApplication; | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||||
import org.springframework.boot.context.properties.EnableConfigurationProperties; | |||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | ||||
/** | /** | ||||
@@ -12,6 +13,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | |||||
* @create: 2020-06-18 16:39 | * @create: 2020-06-18 16:39 | ||||
*/ | */ | ||||
@SpringBootApplication | @SpringBootApplication | ||||
@EnableConfigurationProperties | |||||
@EnableDiscoveryClient | @EnableDiscoveryClient | ||||
@Slf4j | @Slf4j | ||||
public class DipperPositionApplication { | public class DipperPositionApplication { | ||||
@@ -0,0 +1,26 @@ | |||||
package com.telpo.dipperposition.config; | |||||
import lombok.Getter; | |||||
import lombok.Setter; | |||||
import lombok.ToString; | |||||
import org.springframework.beans.factory.annotation.Value; | |||||
import org.springframework.boot.context.properties.ConfigurationProperties; | |||||
import org.springframework.context.annotation.Configuration; | |||||
/** | |||||
* @program: gateway | |||||
* @description: jwt设置 | |||||
* @author: linwl | |||||
* @create: 2020-06-18 17:45 | |||||
*/ | |||||
@Getter | |||||
@Setter | |||||
@ToString | |||||
@ConfigurationProperties("position") | |||||
@Configuration | |||||
public class PositionConfig { | |||||
@Value("${hello}") | |||||
private String hello; | |||||
} |
@@ -7,7 +7,7 @@ | |||||
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />--> | <!--<include resource="org/springframework/boot/logging/logback/base.xml" />--> | ||||
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 --> | <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 --> | ||||
<property name="log.path" value="/var/log/rzladapter"/> | |||||
<property name="log.path" value="/var/log/dipperposition"/> | |||||
<!-- 彩色日志 --> | <!-- 彩色日志 --> | ||||
<!-- 彩色日志依赖的渲染类 --> | <!-- 彩色日志依赖的渲染类 --> | ||||
@@ -172,7 +172,7 @@ | |||||
<!--开发环境:打印控制台--> | <!--开发环境:打印控制台--> | ||||
<springProfile name="dev"> | <springProfile name="dev"> | ||||
<logger name="com.telpo.rzladapter" level="debug"/> | |||||
<logger name="com.telpo.dipperposition" level="debug"/> | |||||
</springProfile> | </springProfile> | ||||
<root level="info"> | <root level="info"> | ||||