-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
137 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
# EditorConfig: http://editorconfig.org/ | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
# EditorConfig: http://editorconfig.org/ | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
soraka-gateway/src/main/java/com/soraka/gateway/service/feign/MenuService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.soraka.gateway.service.feign; | ||
|
||
import com.soraka.common.model.domain.MenuDO; | ||
import com.soraka.gateway.service.feign.fallback.MenuServiceFallbackImpl; | ||
import org.springframework.cloud.netflix.feign.FeignClient; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author yongjie.teng | ||
* @date 2018/10/29 | ||
* @package com.soraka.gateway.service.feign | ||
*/ | ||
@FeignClient(name = "soraka-admin", fallback = MenuServiceFallbackImpl.class) | ||
public interface MenuService { | ||
/** | ||
* 查询角色菜单 | ||
* | ||
* @param roleKeys 角色Key | ||
* @return 菜单列表 | ||
*/ | ||
@GetMapping("menu/roleMenu") | ||
List<MenuDO> findRoleMenu(@RequestParam("roleKeys") List<String> roleKeys); | ||
} |
30 changes: 30 additions & 0 deletions
30
...eway/src/main/java/com/soraka/gateway/service/feign/fallback/MenuServiceFallbackImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.soraka.gateway.service.feign.fallback; | ||
|
||
import com.soraka.common.model.domain.MenuDO; | ||
import com.soraka.gateway.service.feign.MenuService; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* @author yongjie.teng | ||
* @date 2018/10/29 | ||
* @package com.soraka.gateway.service.feign.fallback | ||
*/ | ||
@Slf4j | ||
@Service | ||
public class MenuServiceFallbackImpl implements MenuService { | ||
/** | ||
* 查询角色菜单 | ||
* | ||
* @param roleKeys 角色Key | ||
* @return 菜单列表 | ||
*/ | ||
@Override | ||
public List<MenuDO> findRoleMenu(List<String> roleKeys) { | ||
log.error("调用{}异常{}","findRoleMenu",roleKeys); | ||
return new ArrayList<>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 0 additions & 95 deletions
95
soraka-gateway/src/main/java/com/soraka/gateway/userdetails/UserDetailsImpl.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters