mirror of
https://github.com/201206030/novel.git
synced 2025-04-27 07:30:50 +00:00
修复链接推送失败报错的提示
This commit is contained in:
parent
a9ca517edc
commit
cf347cdf98
@ -507,6 +507,7 @@ public class BookService {
|
||||
|
||||
|
||||
private void sendNewstBook(Long bookId) {
|
||||
try {
|
||||
if (bookId >= 0) {
|
||||
|
||||
//List<String> idList = queryEndBookIdList();
|
||||
@ -525,21 +526,22 @@ public class BookService {
|
||||
ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?site=www.zinglizingli.xyz&token=IuK7oVrPKe3U606x", request, String.class);
|
||||
System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody());
|
||||
|
||||
try {
|
||||
|
||||
Thread.sleep(1000 * 3);
|
||||
|
||||
//reqBody += ("http://www.zinglizingli.xyz/book/" + bookId + ".html" + "\n");
|
||||
System.out.println("推送数据:" + reqBody);
|
||||
stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?appid=1643715155923937&token=fkEcTlId6Cf21Sz3&type=batch", request, String.class);
|
||||
System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody());
|
||||
} catch (InterruptedException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
log.info(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendNewstIndex(BookIndex bookIndex) {
|
||||
try {
|
||||
if (bookIndex != null) {
|
||||
MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
@ -560,16 +562,16 @@ public class BookService {
|
||||
|
||||
System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody());
|
||||
|
||||
try {
|
||||
|
||||
Thread.sleep(1000 * 3);
|
||||
//reqBody += ("http://www.zinglizingli.xyz/book/" + index.getBookId() + "/" + index.getIndexNum() + ".html" + "\n");
|
||||
System.out.println("推送数据:" + reqBody);
|
||||
stringResponseEntity = restTemplate.postForEntity("http://data.zz.baidu.com/urls?appid=1643715155923937&token=fkEcTlId6Cf21Sz3&type=batch", request, String.class);
|
||||
System.out.println("推送URL结果:code:" + stringResponseEntity.getStatusCode().value() + ",body:" + stringResponseEntity.getBody());
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
log.info(e.getMessage(), e);
|
||||
}
|
||||
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
||||
<!-- 指定项目中某个包,当有日志操作行为时的日志记录级别 -->
|
||||
<!-- com.maijinjie.springboot 为根包,也就是只要是发生在这个根包下面的所有日志操作行为的权限都是DEBUG -->
|
||||
<!-- 级别依次为【从高到低】:FATAL > ERROR > WARN > INFO > DEBUG > TRACE -->
|
||||
<logger name="*" level="ERROR">
|
||||
<logger name="*" level="DEBUG">
|
||||
<appender-ref ref="debug" />
|
||||
</logger>
|
||||
</configuration>
|
Loading…
x
Reference in New Issue
Block a user