当前位置: 首页 > news >正文

四会网站建设做相册的网站 网易

四会网站建设,做相册的网站 网易,吴江建设网站,智慧团建pc网页版1.什么是rss#xff1f; RSS 的全称是「简易内容聚合」#xff08;Really Simple Syndication#xff09;#xff0c;是一个能让你在一个地方订阅各种感兴趣网站的工具。 一个网站支持 RSS#xff0c;就意味着每当它新发布一篇新文章#xff0c;就会往一个位于特定网址的…1.什么是rss RSS 的全称是「简易内容聚合」Really Simple Syndication是一个能让你在一个地方订阅各种感兴趣网站的工具。 一个网站支持 RSS就意味着每当它新发布一篇新文章就会往一个位于特定网址的文件中以特定的语法具体而言是 XML 标记语言或 JSON增加一条记录列明这篇文章的标题、作者、发表时间和内容可以是全文也可以是摘要等信息。这样用户只要搜集所有他感兴趣的网站提供的这种文件的网址并不时检查这些文件内容的更新就能知道这些网站是否、何时发布了什么内容。RSS 阅读器的核心功能就是存储用户订阅的 RSS 地址以固定的频率自动检查更新并将其内容转换为易读的格式呈现给用户。 为什么用 RSS RSS 的对立面是算法推荐像微信公众号、知乎、微博、今日头条等平台。 且不说算法推送平台广告多迁移麻烦的问题。算法推荐的特点是你不需要刻意选择算法会根据你的喜好给你推送内容。这样一来你几乎没有选择的余地在不断被「喂饱」中逐渐失去判断的能力。更可怕的地方在于它替你定义了你的画像然后把你潜移默化中变成了它所认为的你。「大数据杀熟」的东窗事发绝非偶然用算法窥视用户隐私是当今互联网公司的通配。 做信息的主人而不是奴隶。RSS 是一种公开的协议可自由更换平台与客户端。重要的一点是获取信息的权力完全自治。RSS 相比算法推荐拥有了可控性和安全感隐私完全掌握在自己手里。 什么是atom Atom是一对彼此相关的标准。Atom供稿格式Atom Syndication Format是用于网站消息来源基于XML的文档格式而Atom出版协定Atom Publishing Protocol简称AtomPub或APP是用于新增及修改网络资源基于HTTP的协议。 它借鉴了各种版本RSS的使用经验被许多的聚合工具广泛使用在发布和使用上。Atom供稿格式设计作为RSS的替代品而Atom出版协定用来取 代现有的多种发布方式如Blogger API和LiveJournal XML-RPC Client/Server Protocol。而值得一提的是Google提供的多种服务正在使用Atom。Google Data APIGData亦基于Atom。 Atom是IETF的建议标准Atom供稿格式列为RFC 4287而Atom出版协定列为RFC 5023。 2.代码工程 实验目标实现rss和atom订阅源 pom.xml ?xml version1.0 encodingUTF-8? project xmlnshttp://maven.apache.org/POM/4.0.0xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdparentartifactIdspringboot-demo/artifactIdgroupIdcom.et/groupIdversion1.0-SNAPSHOT/version/parentmodelVersion4.0.0/modelVersionartifactIdrss/artifactIdpropertiesmaven.compiler.source8/maven.compiler.sourcemaven.compiler.target8/maven.compiler.target/propertiesdependenciesdependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-web/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-autoconfigure/artifactId/dependencydependencygroupIdorg.springframework.boot/groupIdartifactIdspring-boot-starter-test/artifactIdscopetest/scope/dependency!--ROAM依赖 RSS 订阅--dependencygroupIdcom.rometools/groupIdartifactIdrome/artifactIdversion1.15.0/version/dependency!-- https://mvnrepository.com/artifact/com.rometools/rome-utils --dependencygroupIdcom.rometools/groupIdartifactIdrome-utils/artifactIdversion1.15.0/version/dependencydependencygroupIdorg.jdom/groupIdartifactIdjdom2/artifactIdversion2.0.6/version/dependency/dependencies /project controller 采用rome库实现rss和atom订阅 package com.et.rss.controller;import com.rometools.rome.feed.atom.*; import com.rometools.rome.feed.rss.Channel; import com.rometools.rome.feed.rss.Description; import com.rometools.rome.feed.rss.Image; import com.rometools.rome.feed.rss.Item; import com.rometools.rome.feed.synd.SyndPerson; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Collections; import java.util.Date;RestController RequestMapping(/feed) public class FeedController {GetMapping(path /rss)public Channel rss() {Channel channel new Channel();channel.setFeedType(rss_2.0);channel.setTitle(HBLOG Feed);channel.setDescription(Recent posts);channel.setLink(http://www.liuhaihua.cn);channel.setUri(http://www.liuhaihua.cn);channel.setGenerator(Harries);Image image new Image();image.setUrl(http://www.liuhaihua.cn/img/hblog.png);image.setTitle(HBLOG Feed);image.setHeight(32);image.setWidth(32);channel.setImage(image);Date postDate new Date();channel.setPubDate(postDate);Item item new Item();item.setAuthor(Harries);item.setLink(http://www.liuhaihua.cn/archives/710608.html);item.setTitle(Spring Boot integrated banner quick start demo);item.setUri(http://www.liuhaihua.cn/archives/710608.html);item.setComments(http://www.liuhaihua.cn/archives/710608.html#commnet);com.rometools.rome.feed.rss.Category category new com.rometools.rome.feed.rss.Category();category.setValue(CORS);item.setCategories(Collections.singletonList(category));Description descr new Description();descr.setValue(pring Boot Banner is a feature for displaying custom ASCII art and information at application startup. This ASCII art usually includes the project name, version number, author information);item.setDescription(descr);item.setPubDate(postDate);channel.setItems(Collections.singletonList(item));//Like more Entries here about different new topicsreturn channel;}GetMapping(path /atom)public Feed atom() {Feed feed new Feed();feed.setFeedType(atom_1.0);feed.setTitle(HBLOG);feed.setId(http://www.liuhaihua.cn);Content subtitle new Content();subtitle.setType(text/plain);subtitle.setValue(recents post);feed.setSubtitle(subtitle);Date postDate new Date();feed.setUpdated(postDate);Entry entry new Entry();Link link new Link();link.setHref(http://www.liuhaihua.cn/archives/710608.html);entry.setAlternateLinks(Collections.singletonList(link));SyndPerson author new Person();author.setName(HBLOG);entry.setAuthors(Collections.singletonList(author));entry.setCreated(postDate);entry.setPublished(postDate);entry.setUpdated(postDate);entry.setId(710608);entry.setTitle(Spring Boot integrated banner quick start demo);Category category new Category();category.setTerm(CORS);entry.setCategories(Collections.singletonList(category));Content summary new Content();summary.setType(text/plain);summary.setValue(Spring Boot Banner is a feature for displaying custom ASCII art and information at application startup. This ASCII art usually includes the project name, version number, author information);entry.setSummary(summary);feed.setEntries(Collections.singletonList(entry));//add different topicreturn feed;}} DemoApplication.java package com.et.rss;import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;SpringBootApplication public class DemoApplication {public static void main(String[] args) {SpringApplication.run(DemoApplication.class, args);} } application.yaml server:port: 8088 以上只是一些关键代码所有代码请参见下面代码仓库 代码仓库 GitHub - Harries/springboot-demo: a simple springboot demo with some components for example: redis,solr,rockmq and so on. 3.测试 启动Spring Boot应用 rss http://127.0.0.1:8088/feed/rss ?xml version1.0 encodingUTF-8? rss version2.0channeltitleHBLOG Feed/titlelinkhttp://www.liuhaihua.cn/linkdescriptionRecent posts/descriptionpubDateFri, 24 May 2024 14:26:21 GMT/pubDategeneratorHarries/generatorimagetitleHBLOG Feed/titleurlhttp://www.liuhaihua.cn/img/hblog.png/urlwidth32/widthheight32/height/imageitemtitleSpring Boot integrated banner quick start demo/titlelinkhttp://www.liuhaihua.cn/archives/710608.html/linkdescriptionpring Boot Banner is a feature for displaying custom ASCII art and information at application startup. This ASCII art usually includes the project name, version number, author information/descriptioncategoryCORS/categorypubDateFri, 24 May 2024 14:26:21 GMT/pubDateauthorHarries/authorcommentshttp://www.liuhaihua.cn/archives/710608.html#commnet/comments/item/channel /rss atom http://127.0.0.1:8088/feed/atom ?xml version1.0 encodingUTF-8? feed xmlnshttp://www.w3.org/2005/AtomtitleHBLOG/titlesubtitle typetextrecents post/subtitleidhttp://www.liuhaihua.cn/idupdated2024-05-24T14:25:38Z/updatedentrytitleSpring Boot integrated banner quick start demo/titlelink relalternate hrefhttp://www.liuhaihua.cn/archives/710608.html /category termCORS /authornameHBLOG/name/authorid710608/idupdated2024-05-24T14:25:38Z/updatedpublished2024-05-24T14:25:38Z/publishedsummary typetextSpring Boot Banner is a feature for displaying custom ASCII art and information at application startup. This ASCII art usually includes the project name, version number, author information/summary/entry /feed 4.引用 Spring boot RSS feed with romeSpring Boot集成rss快速入门demo | Harries Blog™
http://www.hkea.cn/news/14473279/

相关文章:

  • 简述企业网站建设的目的有哪些校园推广app
  • 做网站用什么开发好二级域名网站查询
  • 苏州微信网站中国企业500强都有哪些企业
  • 做7寸照片的网站网站集约化建设的建议
  • 资兴市建设局网站wordpress 是什么
  • 门户网站建设及运营社交网站开发意义
  • 长域名的优秀网站湖南省郴州市永兴县邮政编码
  • 网站建设服务商推荐网站开发详细设计模板
  • 网站营销怎么做一个简单的网页代码带图片
  • 微擎怎么做网站怎样在亚马逊上开自己的店铺
  • 企业网站建设能解决什么问题网页广告素材
  • 常州seo网站推广wordpress创建公告
  • 深圳罗湖住房和建设局网站家装建材公司网站建设
  • 汝州市住房和城乡规划建设局网站广州建设总承包集团
  • 网站 建设 内容 安排做搜狗手机网站
  • 深圳专业网站设计专业定制网页制作软件下载
  • 内网建站教程手机网站怎么改成电脑版
  • 网站后台管理系统框架网站 制作价格表
  • 网站 图文混编wordpress 图片列表
  • 响应式网站 框架树荫营销网站
  • 宁波网站建设小程序开发新密网站
  • 自己做网站怎么编代码贵州省城乡建设局网站查
  • 一站式做网站公司免费代理游戏
  • 太原高端网站建设重庆网站建设外包哪家好
  • 制作网站网站视频发布播放网站建设
  • 陕西省建设协会岗位证查询网站动漫设计的就业前景
  • 视频盗版网站怎么做陕建云采电子商务平台
  • 重庆市网站备案联合年检在什么网站做
  • 专业建站报价网站设计制作的连接方式
  • 哪些行业需要网站有哪些内容搜索引擎在线