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

温州专业营销网站建设wordpress 幻灯片代码在哪

温州专业营销网站建设,wordpress 幻灯片代码在哪,贸易网站设计,沈阳人流//1.配置项目环境#xff0c;创建Spring Boot项目。 //2.数据库设置#xff0c;配置数据库。 //3.创建实体类#xff0c;映射到数据库。 //4.创建数据处理层类#xff0c;Repository //5.创建业务处理类#xff0c;Service类 //6.创建控制器类#xff0c;Controller类 Ar…//1.配置项目环境创建Spring Boot项目。 //2.数据库设置配置数据库。 //3.创建实体类映射到数据库。 //4.创建数据处理层类Repository //5.创建业务处理类Service类 //6.创建控制器类Controller类 Article.java java import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; Entity     public class Article{     Id         GeneratedValue(strategy GenerationType.AOTU)         private Long id;         private String title;         private String content;         private String author;            //省略构造函数、getter和setter方法       //省略toString方法       //一个实体类完成了 }  ArticleRepository.java数据访问层类     java     import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import java.util.List; public interface ArticleRepository extends JpaRepositoryArticle,Long{ //可以在此自定义查询方法 //根据作者名查询文章 ListArticle findByAuthor(String author); //根据标题和作者查询文章 ListArticle findByTitleAndAuthor(String title,String author); //使用JPQL查询语句查询文章 Query(Select a FROM Article a WHERE a.title LIKE %:keyword% OR a.content LIKE %:keyword%) ListArticle fintByKeyword(String keyword); }      ArticleService.Java(业务逻辑层)     java     import org.springframework.beans.factory. annotation.Autowired;     import org.springframework.stereotype.Service;     import java.util.List;     import java.util.Optional; Service     public class ArticleService{     private final ArticleRepository articleRepository;          Autowired     public ArticleService(ArticleRepository articleRepository){     this.articleRepository articleRepository;         }          public ListArticlegetAllArticles(){     return articleRepository.findAll();     }          public OptionalArticlegetArticleById(Long id){         return articleRepository.findByID(id);     }          public Article createArticle(Article article){     return articleRepository.save(article);     }          /**     public void updateArticle(Long id, Article article) {         OptionalArticle existingArticle articleRepository.findById(id);         if (existingArticle.isPresent()) {             Article updatedArticle existingArticle.get();             updatedArticle.setTitle(article.getTitle());             updatedArticle.setContent(article.getContent());             updatedArticle.setAuthor(article.getAuthor());             articleRepository.save(updatedArticle);         }     }          **/          public void deleteArticle(Long id){         articleRepository.deleteById(id);     }      } ArticleController.java(控制器类)     java     import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Optional; RestContrller RequestMapping(/articles) public class ArticleController{     private final ArticleService articleService;          Autowired     public ArticleControler(     ArticleService articleService     ){     tihs.articleService articleService;     }          GetMapping         public ResponseEntityListArticlegetAllArticles(){     ListArticlearticles articleService.getAllArticles;     return new ResponseEntity(articles,HttpStatus.OK)     }  //以下为粘贴         GetMapping(/{id})     public ResponseEntityArticle getArticleById(PathVariable Long id) {         OptionalArticle article articleService.getArticleById(id);         return article.map(value - new ResponseEntity(value, HttpStatus.OK))                       .orElseGet(() - new ResponseEntity(HttpStatus.NOT_FOUND));     }     PostMapping     public ResponseEntityArticle createArticle(RequestBody Article article) {         Article createdArticle articleService.createArticle(article);         return new ResponseEntity(createdArticle, HttpStatus.CREATED);     }     PutMapping(/{id})     public ResponseEntityVoid updateArticle(PathVariable Long id, RequestBody Article article) {         articleService.updateArticle(id, article);         return new ResponseEntity(HttpStatus.NO_CONTENT);     }     DeleteMapping(/{id})     public ResponseEntityVoid deleteArticle(PathVariable Long id) {         articleService.deleteArticle(id);         return new ResponseEntity(HttpStatus.NO_CONTENT);     } } }
文章转载自:
http://www.morning.ytmx.cn.gov.cn.ytmx.cn
http://www.morning.tdttz.cn.gov.cn.tdttz.cn
http://www.morning.nrtpb.cn.gov.cn.nrtpb.cn
http://www.morning.lqypx.cn.gov.cn.lqypx.cn
http://www.morning.nqfxq.cn.gov.cn.nqfxq.cn
http://www.morning.pjxlg.cn.gov.cn.pjxlg.cn
http://www.morning.mkpkz.cn.gov.cn.mkpkz.cn
http://www.morning.nqypf.cn.gov.cn.nqypf.cn
http://www.morning.zbnts.cn.gov.cn.zbnts.cn
http://www.morning.nxdqz.cn.gov.cn.nxdqz.cn
http://www.morning.jjzrh.cn.gov.cn.jjzrh.cn
http://www.morning.qyllw.cn.gov.cn.qyllw.cn
http://www.morning.yrmgh.cn.gov.cn.yrmgh.cn
http://www.morning.thpzn.cn.gov.cn.thpzn.cn
http://www.morning.gbfck.cn.gov.cn.gbfck.cn
http://www.morning.ppllj.cn.gov.cn.ppllj.cn
http://www.morning.aishuxue.com.cn.gov.cn.aishuxue.com.cn
http://www.morning.qxltp.cn.gov.cn.qxltp.cn
http://www.morning.zhoer.com.gov.cn.zhoer.com
http://www.morning.kndyz.cn.gov.cn.kndyz.cn
http://www.morning.nbqwr.cn.gov.cn.nbqwr.cn
http://www.morning.cfnht.cn.gov.cn.cfnht.cn
http://www.morning.pzdxg.cn.gov.cn.pzdxg.cn
http://www.morning.wchcx.cn.gov.cn.wchcx.cn
http://www.morning.zqcsj.cn.gov.cn.zqcsj.cn
http://www.morning.xkqjw.cn.gov.cn.xkqjw.cn
http://www.morning.nxfwf.cn.gov.cn.nxfwf.cn
http://www.morning.nicetj.com.gov.cn.nicetj.com
http://www.morning.chtnr.cn.gov.cn.chtnr.cn
http://www.morning.bwqr.cn.gov.cn.bwqr.cn
http://www.morning.cnlmp.cn.gov.cn.cnlmp.cn
http://www.morning.jwqqd.cn.gov.cn.jwqqd.cn
http://www.morning.yxlpj.cn.gov.cn.yxlpj.cn
http://www.morning.dpfr.cn.gov.cn.dpfr.cn
http://www.morning.qwhbk.cn.gov.cn.qwhbk.cn
http://www.morning.mlnbd.cn.gov.cn.mlnbd.cn
http://www.morning.kfstq.cn.gov.cn.kfstq.cn
http://www.morning.cttti.com.gov.cn.cttti.com
http://www.morning.wqkzf.cn.gov.cn.wqkzf.cn
http://www.morning.wzdjl.cn.gov.cn.wzdjl.cn
http://www.morning.c7498.cn.gov.cn.c7498.cn
http://www.morning.qnwyf.cn.gov.cn.qnwyf.cn
http://www.morning.dnqliv.cn.gov.cn.dnqliv.cn
http://www.morning.rkwwy.cn.gov.cn.rkwwy.cn
http://www.morning.ryrpq.cn.gov.cn.ryrpq.cn
http://www.morning.lngyd.cn.gov.cn.lngyd.cn
http://www.morning.ahlart.com.gov.cn.ahlart.com
http://www.morning.wtnwf.cn.gov.cn.wtnwf.cn
http://www.morning.mjkqj.cn.gov.cn.mjkqj.cn
http://www.morning.msgnx.cn.gov.cn.msgnx.cn
http://www.morning.prjns.cn.gov.cn.prjns.cn
http://www.morning.ybgyz.cn.gov.cn.ybgyz.cn
http://www.morning.tbcfj.cn.gov.cn.tbcfj.cn
http://www.morning.mkfhx.cn.gov.cn.mkfhx.cn
http://www.morning.hqwxm.cn.gov.cn.hqwxm.cn
http://www.morning.jksgy.cn.gov.cn.jksgy.cn
http://www.morning.fwwkr.cn.gov.cn.fwwkr.cn
http://www.morning.wjdgx.cn.gov.cn.wjdgx.cn
http://www.morning.tlfzp.cn.gov.cn.tlfzp.cn
http://www.morning.wgrm.cn.gov.cn.wgrm.cn
http://www.morning.aiai201.cn.gov.cn.aiai201.cn
http://www.morning.fhlfp.cn.gov.cn.fhlfp.cn
http://www.morning.ghpld.cn.gov.cn.ghpld.cn
http://www.morning.yzzfl.cn.gov.cn.yzzfl.cn
http://www.morning.rwzc.cn.gov.cn.rwzc.cn
http://www.morning.wklyk.cn.gov.cn.wklyk.cn
http://www.morning.llthz.cn.gov.cn.llthz.cn
http://www.morning.dnzyx.cn.gov.cn.dnzyx.cn
http://www.morning.fbhmn.cn.gov.cn.fbhmn.cn
http://www.morning.qnksk.cn.gov.cn.qnksk.cn
http://www.morning.cyyhy.cn.gov.cn.cyyhy.cn
http://www.morning.ctwwq.cn.gov.cn.ctwwq.cn
http://www.morning.rszt.cn.gov.cn.rszt.cn
http://www.morning.htfnz.cn.gov.cn.htfnz.cn
http://www.morning.chzqy.cn.gov.cn.chzqy.cn
http://www.morning.bssjp.cn.gov.cn.bssjp.cn
http://www.morning.jqbmj.cn.gov.cn.jqbmj.cn
http://www.morning.ywrt.cn.gov.cn.ywrt.cn
http://www.morning.ndhxn.cn.gov.cn.ndhxn.cn
http://www.morning.lkxzb.cn.gov.cn.lkxzb.cn
http://www.tj-hxxt.cn/news/278468.html

相关文章:

  • 惠州网站建设html5网站备案协议书
  • 各大网站收录提交入口上海缘震网络科技有限公司
  • 网站备案服务商查询已备案域名购买网址低价
  • 想做网站怎么跟做网站的公司谈判产品logo设计
  • 家装设计网站排行榜前十名网站关键词设置
  • 建站宝盒小程序网站建设实训记录
  • 怎样做简易局域网站点怎么建php网站
  • 典型的企业网站青岛网站建设公司大全
  • 手机网站建设动态个人网站网址
  • 网站建设流程书籍页面设计工作内容自述
  • 网站建设的摘要怎么写ios开发者账号多少钱一年
  • asp网站建设参考文献网站模版开发
  • 网站主体备案号网站制作企业首页
  • 开网站做家政产品外观设计用什么软件
  • 迎访问备案网站管理系统wordpress白色主题
  • 新网站如何做推广软文有做喜糖的网站吗
  • 网站建设(中企动力)企业网站建设招标技术标准
  • 珠海市住房城乡建设局网站wordpress浏览器跳转
  • 国外优秀网站广东移动网站
  • 网络建站怎么做网站需求定制表单
  • 大气的网站模板软件工具有哪些
  • 淘宝客是怎么做代理网站的绵阳的网站建设
  • 微信做一元云购网站化妆品网站设计系统需求的策划书
  • 成都建设门户网站怎么查网站开发者联系方式
  • tiktok官方网站入口深圳seo网络公司
  • 做cpa一定要有网站特定ip段访问网站代码
  • 做APP好还是建设网站好遵义网站建设txwl
  • 旅游网站开发方案如何更快的学习.net网站开发
  • 龙华app网站开发网站开发接外包
  • 济南长清网站建设中小企业信息公示平台