浏览代码

edit news url

liuchaojie 4 年之前
父节点
当前提交
1bafa6f83a
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 1 1
      src/main/java/com/xc/service/impl/NewsServiceImpl.java
  2. 3 0
      src/main/resources/stock2guo.properties

+ 1 - 1
src/main/java/com/xc/service/impl/NewsServiceImpl.java

@@ -27,7 +27,7 @@ public class NewsServiceImpl implements NewsService {
     @Autowired
     NewsMapper newsMapper;
 
-    private static final String url = "http://hjgz.vip/img/default.png";
+    final static String url= PropertiesUtil.getProperty("news.url");
 
     @Override
     public ServerResponse<News> getApiNews(Integer num, Integer start) {

+ 3 - 0
src/main/resources/stock2guo.properties

@@ -14,6 +14,9 @@ ftp.server.http.prefix=http://qwer16888.vip/public/
 #ftp.pass=fdymdM34HHsS8iB6
 #ftp.server.http.prefix=http://www.img.yfkgzq.com/
 
+#新闻图片地址
+news.url=http://qwer16888.vip/public/
+
 # redis config start
 redis1.ip=127.0.0.1
 redis1.port=6379