This commit is contained in:
parent
072c104f24
commit
ef63b8f6db
|
|
@ -36,6 +36,22 @@ public class NewsServiceController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PassToken
|
||||||
|
@GetMapping("/get")
|
||||||
|
private Result<List<News>> List(News news) {
|
||||||
|
try {
|
||||||
|
ServerResult<List<News>> serverResult = newsService.getNewsList(news);
|
||||||
|
if (serverResult.isStart()) {
|
||||||
|
return new Result<>(true, serverResult.getData());
|
||||||
|
} else {
|
||||||
|
return new Result<>(false, -1, serverResult.getMsg());
|
||||||
|
}
|
||||||
|
} catch (RuntimeException e) {
|
||||||
|
return new Result<>(false, -1, e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@PassToken
|
@PassToken
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
private Result<News> getNews(@PathVariable("id") Long id) {
|
private Result<News> getNews(@PathVariable("id") Long id) {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ alibaba.cloud.secret-key=****
|
||||||
# 应用服务 WEB 访问端口
|
# 应用服务 WEB 访问端口
|
||||||
server.port=8083
|
server.port=8083
|
||||||
server.servlet.context-path=/api
|
server.servlet.context-path=/api
|
||||||
logging.level.root=debug
|
logging.level.root=error
|
||||||
# Actuator Web 访问端口
|
# Actuator Web 访问端口
|
||||||
|
|
||||||
management.server.port=8081
|
management.server.port=8081
|
||||||
|
|
@ -24,9 +24,9 @@ spring.servlet.multipart.maxRequestSize=200MB
|
||||||
# 数据库dataSource
|
# 数据库dataSource
|
||||||
jdbc.driver=8zQIdS8RzOBmd4qRctgYdYM/fdvrjnIJHyQH1bD/jNs=
|
jdbc.driver=8zQIdS8RzOBmd4qRctgYdYM/fdvrjnIJHyQH1bD/jNs=
|
||||||
#服务器本地127.0.0.1
|
#服务器本地127.0.0.1
|
||||||
jdbc.urls=jdbc:mysql://127.0.0.1:3306/mall?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
jdbc.url=jdbc:mysql://127.0.0.1:3306/mall?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||||
#azure
|
#azure
|
||||||
jdbc.url=jdbc:mysql://40.83.126.15:3306/mall?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
jdbc.urls=jdbc:mysql://40.83.126.15:3306/mall?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
|
||||||
#服务器ip
|
#服务器ip
|
||||||
jdbc.username=mall
|
jdbc.username=mall
|
||||||
jdbc.password=dr4ap4dbnyCMZTcr
|
jdbc.password=dr4ap4dbnyCMZTcr
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue