Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 83551ea9
authored
Jul 12, 2023
by
chamberone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 解决微服务加载问题
1 parent
c309bbf6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
8 deletions
project-gateway/src/main/java/com/dituhui/pea/gateway/Application.java
project-gateway/src/main/java/com/dituhui/pea/gateway/config/AuthFilter.java
project-interface/src/main/java/com/dituhui/pea/user/IRole.java
project-interface/src/main/java/com/dituhui/pea/user/ITest.java
project-interface/src/main/java/com/dituhui/pea/user/IUser.java
project-gateway/src/main/java/com/dituhui/pea/gateway/Application.java
View file @
83551ea
...
...
@@ -11,8 +11,8 @@ import reactor.core.publisher.Mono;
@EnableDiscoveryClient
@SpringBootApplication
//@EnableFeignClients(basePackages = {"com.dituhui.pea.gateway",
"com.dituhui.pea.user"})
@EnableFeignClients
@EnableFeignClients
(
basePackages
=
{
"com.dituhui.pea.user"
})
//
@EnableFeignClients
public
class
Application
{
@Bean
...
...
project-gateway/src/main/java/com/dituhui/pea/gateway/config/AuthFilter.java
View file @
83551ea
...
...
@@ -21,8 +21,8 @@ import reactor.core.publisher.Mono;
@Slf4j
public
class
AuthFilter
implements
GlobalFilter
,
Ordered
{
//
@Autowired
//
IUser userService;
@Autowired
IUser
userService
;
@Override
public
Mono
<
Void
>
filter
(
ServerWebExchange
exchange
,
GatewayFilterChain
chain
)
{
...
...
project-interface/src/main/java/com/dituhui/pea/user/IRole.java
View file @
83551ea
...
...
@@ -11,9 +11,8 @@ import org.springframework.web.bind.annotation.RequestParam;
/**
* 角色相关接口
* @author zl
*/
@FeignClient
(
value
=
"project-user"
)
@FeignClient
(
value
=
"project-user"
,
contextId
=
"role"
)
public
interface
IRole
{
/**
...
...
project-interface/src/main/java/com/dituhui/pea/user/ITest.java
View file @
83551ea
...
...
@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
@FeignClient
(
value
=
"project-user"
)
@FeignClient
(
value
=
"project-user"
,
contextId
=
"test"
)
public
interface
ITest
{
/**
...
...
project-interface/src/main/java/com/dituhui/pea/user/IUser.java
View file @
83551ea
...
...
@@ -17,7 +17,7 @@ import com.dituhui.pea.pojo.WebResult;
* 用户相关接口
* @author
*/
@FeignClient
(
value
=
"project-user"
)
@FeignClient
(
value
=
"project-user"
,
contextId
=
"user"
)
public
interface
IUser
{
@RequestMapping
(
value
=
"/pea-user/login"
,
method
=
RequestMethod
.
POST
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment