Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e1c612a2
authored
Mar 17, 2021
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调整代码
1 parent
e2462c68
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
8 deletions
src/main/java/com/glsx/admin/SmartAdminApplication.java
src/main/java/com/glsx/admin/remote/IndexFeignClient.java
src/main/java/com/glsx/admin/remote/ProductFeignClient.java
src/main/resources/application.properties
src/main/java/com/glsx/admin/SmartAdminApplication.java
View file @
e1c612a
...
...
@@ -8,13 +8,12 @@ import org.springframework.boot.web.servlet.ServletComponentScan;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.annotation.ComponentScan
;
/**
* @Title: ServiceApplication.java
* @Description:
* @author deployer name
* @version V1.0
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2015
*/
...
...
@@ -24,7 +23,6 @@ import org.springframework.context.annotation.ComponentScan;
@ServletComponentScan
@EnableFeignClients
@EnableDubbo
@ComponentScan
(
"com.glsx.admin"
)
public
class
SmartAdminApplication
extends
SpringBootServletInitializer
{
/**
...
...
src/main/java/com/glsx/admin/remote/IndexFeignClient.java
View file @
e1c612a
...
...
@@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
@FeignClient
(
name
=
"${feig
in.server.name}"
,
url
=
"${feigi
n.server.url}"
,
fallback
=
IndexHystrix
.
class
)
@FeignClient
(
name
=
"${feig
n.server.name}"
,
url
=
"${feig
n.server.url}"
,
fallback
=
IndexHystrix
.
class
)
public
interface
IndexFeignClient
{
@ResponseBody
...
...
src/main/java/com/glsx/admin/remote/ProductFeignClient.java
0 → 100644
View file @
e1c612a
package
com
.
glsx
.
admin
.
remote
;
import
com.github.pagehelper.PageInfo
;
import
com.glsx.admin.pojo.request.SmartProductReq
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-03-16
*/
@FeignClient
(
name
=
"${feign.server.name}"
,
url
=
"${feign.server.url}"
)
public
interface
ProductFeignClient
{
@RequestMapping
(
value
=
"/product/getList"
,
method
=
{
RequestMethod
.
GET
})
@ResponseBody
PageInfo
<
SmartProductReq
>
getList
(
SmartProductReq
req
);
}
src/main/resources/application.properties
View file @
e1c612a
...
...
@@ -16,9 +16,9 @@ logging.level.org.springframework.boot.autoconfigure=off
logging.level.com.glsx.admin
=
DEBUG
logging.path
=
/data/java_log/jetty/smartService/chejia-smart-admin
feig
i
n.server.name
=
chejia-smart-service
feig
i
n.server.url
=
http://localhost:8209/smartService
feign.server.name
=
chejia-smart-service
feign.server.url
=
http://localhost:8209/smartService
dubbo.registry.address
=
zookeeper://192.168.1.36:2181
dubbo.registry.address
=
zookeeper://192.168.1.36:2181
?init.timeout=60000
dubbo.registry.timeout
=
10000
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