使用Struts2,Hibernate和MySQL创建个人MusicManager Web应用程序的研讨会

概述:

在本研讨会教程中,我们将使用Struts 2,Hibernate和MySQL数据库开发一个个人音乐管理器应用程序。 该Web应用程序可用于将您的音乐收藏添加到数据库中。 我们将显示用于添加唱片的表格,并在下面显示所有音乐收藏。 通过单击“删除”链接,可以从每一行中删除记录。 我们选择Struts2是因为它是灵活的J2EE框架之一。 该数据库是MySQL,我们已使用Hibernate作为ORM工具。

使用的工具:

  1. 面向Web开发人员的Eclipse Indigo Java EE IDE
  2. Struts2
  3. 休眠3
  4. Hibernate Tools Eclipse插件版本3.5.1
  5. mysql JDBC jar(mysql-connector-java-5.1.23)
  6. 雄猫7

步骤1:准备数据库

我们使用phpMyAdmin设计数据库并向其中添加表。 您可以使用任何工具在MySQL中创建表。 下面是表格的屏幕截图。

image001

我们创建的数据库是music_manager,并且表albumtbl将用于存储音乐数据。 暂时忽略genretbl,因为在本教程的后面部分中,我们将使用此表作为主表来存储所有音乐流派。

CREATE TABLE IF NOT EXISTS `albumtbl` (`music_id` INT(4) NOT NULL AUTO_INCREMENT,`album_title` VARCHAR(255) NOT NULL,`album_genre` VARCHAR(255) NOT NULL,`album_artists` text NOT NULL,`no_of_tracks` INT(2) NOT NULL,PRIMARY KEY (`music_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;INSERT INTO `albumtbl` (`music_id`, `album_title`, `album_genre`, `album_artists`, `no_of_tracks`) VALUES
(1, 'Trouble-Akon', 'Hip Hop', 'Akon', 11),
(3, 'Savage Island', 'Contemporary R&B', 'Savage, Ganxstardd,  Soulja Boy,  David Dallas,  Sean P, Pitbull', 16),
(4, 'Kiss (Carly Rae Jepsen album)', 'Pop', 'Carly Rae Jepsen, Justin Bieber, Owl City', 12),
(5, 'Taylor Swift (album)', 'Pop', 'Taylor Swift', 15);

步骤2:在Java源代码中创建软件包,如屏幕快照所示

图片003-300x183

  • “ businessobjects”包将包含数据库表中字段的POJO Java bean。
  • 在“ dao”包中将包含数据访问层java类。 我们有一个接口dao及其实现版本。 该Dao实际上将完成交谈和更新表的工作。
  • 'hbm'软件包包含* .hbm文件,用于将Hibernate xml映射到表字段。
  • 'utils'软件包包含所有要由其他类使用的Utility类。
  • “动作”将具有所有Struts 2动作类。
  • 'delegates'包具有委托java类,它将充当前端层和休眠dao层之间的桥梁。
  • 'forms'包在Struts 2中是可选的,因为它没有ActionForm概念。 但是,为了简单起见和可维护性,我们将所有getter设置程序保留在此处,并且该类将从其扩展。

步骤3:将jar文件复制到lib文件夹中

image005

您将需要从Tomcat安装目录中获取的servlet-api.jar文件。 我的Tomcat位于C:\ Java \ Tomcat \ tomcat7文件夹中。

image007

步骤4:添加Struts 2支持

包括Struts2.xml并将引用放在web.xml中以支持struts2。

image009

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">  <display-name>PersonalMusicManagerApp</display-name><welcome-file-list><welcome-file>index.jsp</welcome-file></welcome-file-list><filter><filter-name>struts2</filter-name><filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class></filter><filter-mapping><filter-name>struts2</filter-name><url-pattern>*.action</url-pattern></filter-mapping>
</web-app>

struts.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN""http://struts.apache.org/dtds/struts-2.0.dtd"><struts><constant name="struts.enable.DynamicMethodInvocation" value="false" /><constant name="struts.devMode" value="false" /><package name="default" extends="struts-default" namespace="/"><default-action-ref name="index" /><action name="index"><result>index.jsp</result></action><action name="listAlbum" class="com.tctalk.apps.mmgr.web.actions.MusicManagerAction" method="getAllAlbumList" ><result name="success">/WEB-INF/web/jsps/musicmgr.jsp</result></action><action name="addAlbum" class ="com.tctalk.apps.mmgr.web.actions.MusicManagerAction" method="addAlbumToCollection" ><result name="input">listAlbum</result><result name="success" type="redirectAction">listAlbum</result></action><action name="delAlbum" class ="com.tctalk.apps.mmgr.web.actions.MusicManagerAction" method="delAlbumFromCollection" ><result name="success" type="redirectAction">listAlbum</result></action></package></struts>

步骤5:添加Hibernate支持

为了与Hibernate一起使用,我们使用了Jboss Elipse Hibernate插件来为此生成hbm文件。 该插件是可选的,因为它将节省一些时间,以方便地手动生成“休眠配置”和hbm文件。 我们已经有一个不错的分步教程,介绍如何使用此插件自动生成hbm和java文件。 单击此处转到教程– http://www.techcubetalk.com/2013/04/step-by-step-auto-code-generation-for-pojo-domain-java-classes-and-hbm-files-使用椭圆休眠的插件/

您可以从Eclipse版本从jboss.org下载该插件。

image011

步骤5a:创建hibernate.cfg.xml-这将具有所有数据库身份验证信息

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration><session-factory name=""><property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property><property name="hibernate.connection.url">jdbc:mysql://localhost:3306/music_manager</property><property name="hibernate.connection.username">root</property><property name="hibernate.connection.password"></property><property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property><mapping resource="com/tctalk/apps/mmgr/db/hbm/Albumtbl.hbm.xml" /></session-factory>
</hibernate-configuration>

步骤5b:AlbumBO.java – POJO对应于表albumtbl

package com.tctalk.apps.mmgr.db.businessobjects;
// Generated by Hibernate Tools 3.4.0.CR1/*** AlbumtblBO generated by hbm2java*/public class AlbumtblBO implements java.io.Serializable {private static final long serialVersionUID = -1445059679188116334L;private int musicId;private String albumTitle;private String albumGenre;private String albumArtists;private int noOfTracks;public AlbumtblBO() {}public AlbumtblBO(int musicId, String albumTitle, String albumGenre,String albumArtists, int noOfTracks) {this.musicId = musicId;this.albumTitle = albumTitle;this.albumGenre = albumGenre;this.albumArtists = albumArtists;this.noOfTracks = noOfTracks;}public int getMusicId() {return this.musicId;}public void setMusicId(int musicId) {this.musicId = musicId;}public String getAlbumTitle() {return this.albumTitle;}public void setAlbumTitle(String albumTitle) {this.albumTitle = albumTitle;}public String getAlbumGenre() {return this.albumGenre;}public void setAlbumGenre(String albumGenre) {this.albumGenre = albumGenre;}public String getAlbumArtists() {return this.albumArtists;}public void setAlbumArtists(String albumArtists) {this.albumArtists = albumArtists;}public int getNoOfTracks() {return this.noOfTracks;}public void setNoOfTracks(int noOfTracks) {this.noOfTracks = noOfTracks;}}

步骤5c:Albumtbl.hbm.xml –它包含表Albumtbl表的字段和POJO类AlbumBO的字段之间的映射。

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Mar 17, 2013 11:53:52 PM by Hibernate Tools 3.4.0.CR1 -->
<hibernate-mapping><class name="com.tctalk.apps.mmgr.db.businessobjects.AlbumtblBO" table="albumtbl" catalog="music_manager"><id name="musicId" type="int"><column name="music_id" /><generator class="assigned" /></id><property name="albumTitle" type="string"><column name="album_title" not-null="true" /></property><property name="albumGenre" type="string"><column name="album_genre" not-null="true" /></property><property name="albumArtists" type="string"><column name="album_artists" length="65535" not-null="true" /></property><property name="noOfTracks" type="int"><column name="no_of_tracks" not-null="true" /></property></class>
</hibernate-mapping>

步骤5d:HibernateUtils.java –这是休眠会话处理实用程序类
MusicMgrConstant.java也具有要从中引用的hibernate.cfg.xml的位置/路径。

package com.tctalk.apps.mmgr.utils;import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;public class HibernateUtils {private static SessionFactory hbmSessionFactory;static {try {Configuration cfg = new Configuration().configure(MusicMgrConstant._HIBERNATE_CONFIG_LOCATION);hbmSessionFactory = cfg.buildSessionFactory();} catch (RuntimeException ex) {System.out.println("********* Error occurred while reading config file *********");ex.printStackTrace();}}/*** getSession creates hibernate Session & returns it*/public static Session getSession() {return hbmSessionFactory.openSession();}/*** closeSession closes the session, if it exists*/public static void closeSession(Session inSession) {if (inSession != null) {inSession.close();}}
}
package com.tctalk.apps.mmgr.utils;public interface MusicMgrConstant {String _HIBERNATE_CONFIG_LOCATION = "hibernate.cfg.xml";
}

步骤5e​​:MusicManagerDao.java和MusicManagerDaoImpl.java –这些是DAO类,具有列出,添加和删除数据库中数据的方法。

package com.tctalk.apps.mmgr.db.dao;import java.util.List;import com.tctalk.apps.mmgr.db.businessobjects.AlbumtblBO;public interface MusicManagerDao {public List getAllMusicAlbumsFromCollection();public boolean addAlbum(AlbumtblBO album);public boolean delAlbum(int albumId);
}
package com.tctalk.apps.mmgr.db.dao;import java.util.List;import org.hibernate.Criteria;
import org.hibernate.Session;import com.tctalk.apps.mmgr.db.businessobjects.AlbumtblBO;
import com.tctalk.apps.mmgr.utils.HibernateUtils;public class MusicManagerDaoImpl implements MusicManagerDao {public List getAllMusicAlbumsFromCollection() {List albumList = null;Session hbmSession = null;try {hbmSession = HibernateUtils.getSession();Criteria criteria = hbmSession.createCriteria(AlbumtblBO.class);albumList = criteria.list();} catch (Exception ex) {ex.printStackTrace();} finally {HibernateUtils.closeSession(hbmSession);}return albumList;}public boolean addAlbum(AlbumtblBO album) {Session hbmSession = null;boolean STATUS_FLAG = true;try {hbmSession = HibernateUtils.getSession();hbmSession.beginTransaction();//add the album to the hibernate session to savehbmSession.save(album);hbmSession.getTransaction().commit();} catch (Exception ex) {ex.printStackTrace();STATUS_FLAG = false;} finally {HibernateUtils.closeSession(hbmSession);}return STATUS_FLAG;}public boolean delAlbum(int albumId) {Session hbmSession = null;boolean STATUS_FLAG = true;try {hbmSession = HibernateUtils.getSession();hbmSession.beginTransaction();//first retrieve the album corresponds to that idAlbumtblBO albumObj = (AlbumtblBO)hbmSession.load(AlbumtblBO.class, albumId);hbmSession.delete(albumObj);hbmSession.getTransaction().commit();} catch (Exception ex) {ex.printStackTrace();STATUS_FLAG = false;} finally {HibernateUtils.closeSession(hbmSession);}return STATUS_FLAG;}}

步骤6:在“ WebContent”部分中创建UI层

我们创建了“ web”文件夹,以将所有与UI相关的文件保留在那里。 由于此应用程序只有一个JSP,因此我们将创建jsp文件夹并复制musicmngr.jsp。
在中,我们将表单数据发布到操作addAlbum。 在此之下,我们遍历表中的专辑列表以列出音乐专辑。

Musicmngr.jsp

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TechcubeTalk.com - Let's build apps from scratch series - Personal Music Manager Application</title>
</head>
<body>
<h2>:: TechcubeTalk.com - Personal Music Manager ::</h2>
<div style="margin-bottom: 25px;">
<s:form action="addAlbum" method="POST"><s:textfield label="Album Title" name="album.albumTitle"/><s:textfield label="Music Genre" name="album.albumGenre"/><s:textarea label="Artist Names" name="album.albumArtists" cols="40" rows="10"/><s:textfield label="Total No of Tracks" name="album.noOfTracks"/><s:submit value="Add Music Album" align="center"/>
</s:form>
</div>
<div><table style="border: 1px dotted black;"><tr><th style="background-color:#ABDCFF;">Album Title</th><th style="background-color:#ABDCFF;">Music Genre</th><th style="background-color:#ABDCFF;">Artist Names</th><th style="background-color:#ABDCFF;">Total No of Tracks</th><th style="background-color:#ABDCFF;">Delete</th></tr><s:iterator value="albumList" var="album"><tr><td><s:property value="albumTitle"/></td><td><s:property value="albumGenre"/></td><td><s:property value="albumArtists"/></td><td><s:property value="noOfTracks"/></td><td><a href="delAlbum.action?musicId=<s:property value="musicId"/>">delete</a></td></tr></s:iterator></table>
</div>
</body>
</html>

步骤7:添加动作类

动作类MusicManagerAction.java将处理jsp的所有数据处理。 此类扩展了MusicManagerForm,这只是一个POJO,以使所有getter / setter对应于jsp的所有表单值和albumList。

  • getAllAlbumList()方法通过MusicManagerDelegate从数据库中检索音乐专辑列表,并在albumList变量中进行设置。
  • addAlbumToCollection()方法将音乐专辑添加到数据库中。
  • delAlbumFromCollection()从数据库中删除基于musicId的特定专辑。

MusicManagerAction.java

package com.tctalk.apps.mmgr.web.actions;import java.util.List;import com.tctalk.apps.mmgr.db.businessobjects.AlbumtblBO;
import com.tctalk.apps.mmgr.web.delegates.MusicManagerDelegate;
import com.tctalk.apps.mmgr.web.forms.MusicManagerForm;public class MusicManagerAction extends MusicManagerForm {private static final long serialVersionUID = 9168149105719285096L;private MusicManagerDelegate musicMgrDelegate = new MusicManagerDelegate();public String getAllAlbumList(){List albumList = musicMgrDelegate.getAllMusicAlbums();String returnString = ERROR;if(albumList != null) {setAlbumList(albumList);returnString = SUCCESS;}return returnString;}public String addAlbumToCollection(){String returnString = ERROR;AlbumtblBO album = getAlbum();if(musicMgrDelegate.addAlbumToCollection(album)){returnString = SUCCESS;}return returnString;}public String delAlbumFromCollection(){String returnString = ERROR;int albumId = getMusicId();if(musicMgrDelegate.delAlbumFromCollection(albumId)) {returnString = SUCCESS;}return returnString;}
}

MusicManagerForm.java

package com.tctalk.apps.mmgr.web.forms;import java.util.List;import com.opensymphony.xwork2.ActionSupport;
import com.tctalk.apps.mmgr.db.businessobjects.AlbumtblBO;public class MusicManagerForm extends ActionSupport {private static final long serialVersionUID = 706337856877546963L;private List albumList 			= null;private AlbumtblBO album					= null;private int musicId;public AlbumtblBO getAlbum() {return album;}public void setAlbum(AlbumtblBO album) {this.album = album;}public List getAlbumList() {return albumList;}public void setAlbumList(List albumList) {this.albumList = albumList;}public int getMusicId() {return musicId;}public void setMusicId(int musicId) {this.musicId = musicId;}}

步骤8:添加代表类

委托类充当表示层和数据库处理层之间的桥梁。 它接受输入并传递到数据库层(dao类)以在数据库中添加/删除数据。 同样,它从数据库中获取数据并显示在页面中。

MusicManagerDelegate.java

package com.tctalk.apps.mmgr.web.delegates;import java.util.List;import com.tctalk.apps.mmgr.db.businessobjects.AlbumtblBO;
import com.tctalk.apps.mmgr.db.dao.MusicManagerDao;
import com.tctalk.apps.mmgr.db.dao.MusicManagerDaoImpl;public class MusicManagerDelegate {MusicManagerDao mmgrDao = (MusicManagerDao) new MusicManagerDaoImpl();public List getAllMusicAlbums() {		return mmgrDao.getAllMusicAlbumsFromCollection();}public boolean addAlbumToCollection(AlbumtblBO albumobj) {return mmgrDao.addAlbum(albumobj);}public boolean delAlbumFromCollection(int albumId) {return mmgrDao.delAlbum(albumId);}
}

步骤9:最终整合

整合完成后,最终的包装结构将如下所示-

image013
生成项目并右键单击它,然后选择“导出为战争文件”并保存在已知文件夹中。 打开Tomcat管理器控制台应用程序,然后浏览WAR文件以进行安装。

image015

安装完成后,以(http:// localhost:8080 / PersonalMusicManagerApp – URL可能因Tomcat安装文件夹/端口等而异)运行该应用程序。

如果一切顺利运行,将显示屏幕–

image017

  • 从GitHub存储库中以zip和war下载项目

参考: TechCubeTalk博客上的JCG合作伙伴 Suvoraj Biswas提供的关于 使用Struts2,Hibernate和MySQL创建Personal MusicManager Web应用程序的研讨会 。

翻译自: https://www.javacodegeeks.com/2013/12/workshop-on-creating-a-personal-musicmanager-web-application-with-struts2-hibernate-and-mysql.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/365743.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

链表快速排序python_Python一行代码实现快速排序的方法

今天将单独为大家介绍一下快速排序&#xff01; 一、算法介绍 排序算法&#xff08;Sorting algorithm&#xff09;是计算机科学最古老、最基本的课题之一。要想成为合格的程序员&#xff0c;就必须理解和掌握各种排序算法。其中"快速排序"&#xff08;Quicksort&…

自定义滚动条样式

啥都不说先看图: 注: 只适合chrom,不适用IE和fireFox 下面展示代码: 1 <html lang"en">2 <head>3 <meta charset"UTF-8">4 <title>CSS3自定义滚动条-轩枫阁</title>5 <style>6 header7 {8 font-family: …

解决zsh下ls命令无高亮颜色问题

问题原因因为本人比较菜不清楚, 但总归瞎弄解决了, 做个记录 解决方法 进入用户目录下的.bashrc(~/.bashrc), 寻找ls相关配置找到后将相关配置复制到.zshrc(~/.zshrc)中如果找不到的话, 可以复制我找到的直接复制. if [ -x /usr/bin/dircolors ]; thentest -r ~/.dircolors &am…

[折半搜索][has] Jzoj P4250 路径

Description A国有n个城市&#xff0c;编号为1到n&#xff0c;任意两个城市之间有一条路。shlw闲得没事干想周游A国&#xff0c;及从城市1出发&#xff0c;经过且仅经过除城市1外的每个城市1次&#xff08;城市1两次&#xff09;&#xff0c;最后回到城市1。由于shlw很傻&#…

使用Guava CharMatcher和Apache Commons Lang StringUtils确定字符串中字符或整数的存在

最近Reddit上的帖子提出了一个问题&#xff1a;“ 是否存在一种预定义的方法来检查变量值是否包含特定字符或整数&#xff1f; ”基于问题的标题也被以另一种方式问到&#xff0c;“一种检查变量是否包含诸如列表之类的数字的方法或快速方法&#xff0c;例如或&#xff08;x&am…

rust为什么显示不了国服_Rust编程语言初探

静态、强类型而又不带垃圾收集的编程语言领域内&#xff0c;很久没有新加入者参与竞争了&#xff0c;大概大部分开发者认为传统的C/C的思路已经不太适合新时代的编程需求&#xff0c;即便有Ken Tompson这样的大神参与设计的golang也采用了GC的思路来设计其新一代的语言&#xf…

wps表格粗线和细线区别_详解论文中的表格技术

今天我们主要学习的技能如下&#xff1a;• 怎样用word做论文要求的三线表• 三线表中辅助线的断开• 表格或者图片自动编号1. 先普及一下&#xff0c;论文中的三线表吧。三线表以其形式简洁、功能分明、阅读方便而在科技论文中被推荐使用。三线表通常只有3条线&#xff0c;即顶…

素材

svg: www.sfont.cn/svg/ehed7f 转载于:https://juejin.im/post/5b9b70a8e51d450e4b1bdd33

如何自定义CSS滚动条的样式?

欢迎大家前往腾讯云 社区&#xff0c;获取更多腾讯海量技术实践干货哦~ 本文由前端林子发表 本文会介绍CSS滚动条选择器&#xff0c;并在demo中展示如何在Webkit内核浏览器和IE浏览器中&#xff0c;自定义一个横向以及一个纵向的滚动条。 0.需求 有的时候我们不想使用浏览器默…

RabbitMQ基础知识

RabbitMQ基础知识 一、背景RabbitMQ是一个由erlang开发的AMQP&#xff08;Advanced Message Queue &#xff09;的开源实现。AMQP 的出现其实也是应了广大人民群众的需求&#xff0c;虽然在同步消息通讯的世界里有很多公开标准&#xff08;如 COBAR的 IIOP &#xff0c;或者是 …

使用Spring RestTemplate和Super类型令牌消费Spring-hateoas Rest服务

Spring-hateoas为应用程序创建遵循HATEOAS原理的基于REST的服务提供了一种极好的方法。 我的目的不是要展示如何创建服务本身&#xff0c;而是要展示如何将客户端写入服务。 我将要使用的示例服务是Josh Long&#xff08; starbuxman &#xff09;编写的“ the-spring-rest-s…

ansible-playbook 实战案例 全网备份 实时备份

目录 ansible-playbook 基础介绍1.YAML三板斧2. ansible playbook 安装apache 示例案例 全网备份 实时备份环境规划目录规划base.yamlrsync.yamlnfs.yamlsersync.yamlweb.yamlmail.yamlansible-playbook 基础介绍 playbook是由一个或多个模块组成的&#xff0c;使用多个不同的模…

iview 级联选择组件_使用 element-ui 级联插件遇到的坑

需求描述【省市区三级联动】组件&#xff1a;Cascader 级联选择器后端需要所选中的地区的名字&#xff0c;如&#xff1a;[北京市, 北京市, 东城区]获取后端省市区具体列表的接口返回数据&#xff1a;// 省 - 参数1 [{value: 1,label: 北京市},... ] // 市 - 参数2 [{value: 1,…

python高级语法装饰器_Python高级编程——装饰器Decorator超详细讲解上

Python高级编程——装饰器Decorator超详细讲解&#xff08;上篇&#xff09;送你小心心记得关注我哦&#xff01;&#xff01; 进入正文全文摘要 装饰器decorator&#xff0c;是python语言的重要特性&#xff0c;我们平时都会遇到&#xff0c;无论是面向对象的设计或者是使用相…

深入理解CPU和异构计算芯片GPU/FPGA/ASIC (上篇)

王玉伟&#xff0c;腾讯TEG架构平台部平台开发中心基础研发组资深工程师&#xff0c;专注于为数据中心提供高效的异构加速云解决方案。目前&#xff0c;FPGA已在腾讯海量图片处理以及检测领域已规模上线。 随着互联网用户的快速增长&#xff0c;数据体量的急剧膨胀&#xff0c;…

jenkins-基础配置

一&#xff0c;配置远程连接服务器 系统管理 --> 系统设置 SSH remote hosts 二&#xff0c;设置docke的URL&#xff08;设置jenkins构建镜像时候所连接的docker url &#xff0c;参考 docker开启远程访问https://www.cnblogs.com/galsnag/articles/10069709.html&#xf…

JSF:直接从页面将参数传递给JSF操作方法,这是JavaEE 6+的一个不错的功能

Java企业版JavaEE 6中提供的JSF 2的一项不错的功能是&#xff0c;您可以将参数传递给任何操作组件&#xff08;例如commandButton或commandLink组件&#xff09;的操作方法。 基于此&#xff0c;您可以最大程度地减少托管bean中的方法数量。 另外&#xff0c;为了最小化在bea…

CCF CSP个人题解汇总

趁着这波考CCF热来骗一波访问量 祝自己免修算法RP 区域赛RP 1、2题汇总在这&#xff1a;https://www.cnblogs.com/QAQorz/p/9650890.html 201803-4 棋局评估&#xff08;对抗搜索&#xff09;&#xff1a;https://www.cnblogs.com/QAQorz/p/9650828.html 201709-4 通信网络&…

海洋主题绘画_深圳举办风帆时代海洋绘画作品展,展出作品600余件

12月12日&#xff0c;第七届《风帆时代海洋绘画作品展》在位于蛇口邮轮中心3楼的深圳大学海洋文化科普教育基地举行开幕仪式。该项目得到深圳市宣传文化事业专项基金支持&#xff0c;由深圳大学海洋艺术研究中心主办&#xff0c;深圳市海洋文化艺术研究会承办。作为开幕式重要环…

不要被约束的意思_不要再奢望你会变得自律了丨“他律”比“自律”更重要

高三寒假和同学打赌一个假期做完400套卷子。否则给他1000元。。。然后每天早上六点晚上12点&#xff0c;春节也没过&#xff0c;最后做完了卷子&#xff0c;我也完成了自己的梦想&#xff01;&#xff01;&#xff01;然而上面这个大神不是我&#xff0c;是我引用的一颗真实栗子…