Selaa lähdekoodia

edit news url

liuchaojie 4 vuotta sitten
vanhempi
commit
1bafa6f83a

+ 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