Commit fbf94c08 authored by lihaipeng's avatar lihaipeng

modify

parent 56cf4cdc
package com.unififi.api;
import com.unififi.model.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
......@@ -10,7 +9,6 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
@FeignClient(value = "unififi-demo2-service")
@Api(tags = "用户操作")
public interface UserApi {
@RequestMapping(value = "/echo/{string}", method = RequestMethod.GET)
......
package com.unififi.controller;
import com.unififi.config.AppConfig;
import com.unififi.api.UserApi;
import com.unififi.config.AppConfig;
import com.unififi.model.User;
import com.unififi.service.UserService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
......@@ -12,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@Api(tags = "用户操作")
public class Demo2Controller implements UserApi {
@Autowired
......@@ -54,7 +56,7 @@ public class Demo2Controller implements UserApi {
return userService.get(name);
}
@GetMapping("/config/username")
@GetMapping("/config/username1")
public String get() throws InterruptedException {
return appConfig.getUsername();
}
......
......@@ -38,17 +38,12 @@
<logger name="org.springframework" level="WARN"/>
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ASYNC"/>
</root>
<!-- 开发环境输出到控制台 -->
<springProfile name="dev">
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
</springProfile>
<!-- 生产环境输出到文件 -->
<springProfile name="prod">
<root level="INFO">
<appender-ref ref="ASYNC"/>
</root>
</springProfile>
</configuration>
......@@ -49,17 +49,12 @@
<logger name="org.springframework" level="WARN"/>
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="ASYNC"/>
</root>
<!-- 开发环境输出到控制台 -->
<springProfile name="dev">
<root level="INFO">
<appender-ref ref="STDOUT"/>
</root>
</springProfile>
<!-- 生产环境输出到文件 -->
<springProfile name="prod">
<root level="INFO">
<appender-ref ref="ASYNC"/>
</root>
</springProfile>
</configuration>
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