Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
U
unififi-spring-cloud-guide
Project
Project
Details
Activity
Releases
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
lihaipeng
unififi-spring-cloud-guide
Commits
fbf94c08
Commit
fbf94c08
authored
Jul 21, 2020
by
lihaipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
56cf4cdc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
24 deletions
+14
-24
UserApi.java
unififi-demo-api/src/main/java/com/unififi/api/UserApi.java
+0
-2
Demo2Controller.java
...src/main/java/com/unififi/controller/Demo2Controller.java
+4
-2
logback-spring.xml
unififi-demo2-service/src/main/resources/logback-spring.xml
+5
-10
logback-spring.xml
unififi-gateway/src/main/resources/logback-spring.xml
+5
-10
No files found.
unififi-demo-api/src/main/java/com/unififi/api/UserApi.java
View file @
fbf94c08
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
)
...
...
unififi-demo2-service/src/main/java/com/unififi/controller/Demo2Controller.java
View file @
fbf94c08
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/username
1
"
)
public
String
get
()
throws
InterruptedException
{
return
appConfig
.
getUsername
();
}
...
...
unififi-demo2-service/src/main/resources/logback-spring.xml
View file @
fbf94c08
...
...
@@ -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>
unififi-gateway/src/main/resources/logback-spring.xml
View file @
fbf94c08
...
...
@@ -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>
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