新書推薦:
《
你当我好骗吗?
》
售價:HK$
120.9
《
跨代伴侣治疗
》
售價:HK$
96.8
《
精华类化妆品配方与制备手册
》
售價:HK$
217.8
《
经纬度丛书:出祁山:诸葛亮北伐得与失
》
售價:HK$
96.8
《
心理治疗中的真意:心理治疗师的心灵之旅
》
售價:HK$
96.8
《
心理咨询与治疗技术经典入门(第3版)
》
售價:HK$
142.9
《
无冕之王:齐桓公与齐国崛起
》
售價:HK$
63.8
《
中国涉外法治蓝皮书(2024)
》
售價:HK$
98.0
|
內容簡介: |
本书主要包括IntelliJ IDEA,JDBC,Servlet,Vue四部分内容,这四部分是学习Java Web开发的重点。在IntelliJ IDEA部分介绍了40多种使用技巧,还介绍了IntelliJ IDEA的核心技能,包括调试Java项目,创建Java/Web/JavaMaven/WebMaven项目等。JDBC部分介绍如何处理海量数据的查询与添加操作,常见JDBC接口的使用等功能。Servlet部分介绍了request-response请求响应模型原理,接口Servlet,ServletConfig的使用,web.xml中常见的配置,HttpServletRequest和HttpServletResponse接口的使用等核心技术的使用。Vue章节介绍了模板语法、计算属性和侦听器、Class和Style操作、条件渲染、列表渲染、事件处理、等核心技能。后以购物车的案例将所有知识点串联,达到综合演练的目的。
|
關於作者: |
高洪岩,某世界500强企业项目经理,有10年Java开发经验,精通Java语言,擅长JavaEE,分布式,微服务,高性能服务器架构,报表,多线程和高并发相关的技术内容,理论与实践经验颇丰。著有《Java多线程编程核心技术》《Java并发编程:核心方法与框架》《NIO与Socket编程技术指南》《Java EE核心框架实战 第2版》《Jasper Reports iReport报表开发详解》《Android学习精要》《虚拟化高性能NoSQL存储案例精粹 Redis Docker》等书籍。
|
目錄:
|
目 录
第 1 章 IntelliJ IDEA 常用技巧 ················································································.1
1.1 初次配置 IntelliJ IDEA ···············································································.2
1.2 创建 Java 项目 ···························································································.4
1.2.1 关联 JDK 并创建 Java 项目 ······································································.4
1.2.2 查看项目结构 ·······················································································.6
1.2.3 创建 Java 类 ·························································································.6
1.2.4 运行 Java 类 ·························································································.7
1.3 IntelliJ IDEA 相关配置与使用技巧 ······························································.7
1.3.1 配置界面皮肤 ·······················································································.8
1.3.2 设置 Eclipse 风格的快捷键 ······································································.8
1.3.3 更改代码编辑器文字大小 ········································································.8
1.3.4 快速生成代码 ························································································.8
1.3.5 设置快捷键“Alt /” ···············································································.9
1.3.6 设置代码完成对大小写不敏感 ·································································.10
1.3.7 配置 JDK ···························································································.11
1.3.8 设置自动编译 ······················································································.13
1.3.10 抛出异常 ··························································································.13
1.3.11 使用“Ctrl Alt T”快捷键生成代码块 ····················································.13
1.3.12 使用 Generate 菜单生成方法 ··································································.14
1.3.13 使用 fori 生成 for 语句 ·········································································.16
1.3.14 实现自动导入的功能 ···········································································.16
1.3.15 实现水平或垂直分屏的功能 ··································································.16
1.3.16 树形显示包结构 ·················································································.17
1.3.17 设置“F2”键用于改名 ········································································.18
1.3.18 将类的方法抽取成接口 ········································································.18
1.3.19 Maven 项目下载源代码和帮助文档 ·························································.19
Java Web 实操
1.3.20 Find Usages 菜单查看方法调用 ······························································.20
1.3.21 增加控制台保存输出信息的缓冲区大小 ···················································.20
1.3.22 增加可用内存 ····················································································.21
1.3.23 启用 Toolbar ······················································································.21
1.3.24 显示方法分割符 ·················································································.21
1.3.25 设置文件编码 ····················································································.22
1.3.26 使用快捷键找到对应的功能名称 ····························································.24
1.3.27 使用快捷键自动生成返回值或声明变量 ···················································.24
1.3.28 使用快捷键实现代码导航 ·····································································.24
1.3.29 使用“F4”键查看类继承结构 ·······························································.24
1.3.30 使用快捷键查看类大纲结构 ··································································.24
1.3.31 使用快捷键搜索与替换文本功能 ····························································.25
1.3.32 使用“Ctrl H”快捷键实现查询更大范围的功能 ········································.25
1.3.33 使用“Shift”键实现全局搜索 ·······························································.26
1.3.34 生成 UML 类图 ··················································································.27
1.3.35 使用快捷键查看方法的重写或实现 ····························································.28
1.3.36 使用快捷键查看文件 ···········································································.28
1.3.37 生成.jar 文件 ·································································
|
內容試閱:
|
前 言
每当有Java学习者问我,怎么样才能学好SSM(Spring-SpringMVC-MyBatis)时,我都会陷入沉思,原因并不是不能立即给予答案,而是内心非常愧疚,又有学习者遇到了迷茫点,而我能为他们做些什么呢?这就是本书出版的主要原因。
有SSM开发经验的人都知道,SSM的基础是Java SE和Java Web。如果在学习SSM之前没有打好Java Web的基础,则往往会遇到前面学习者同样的问题。因为SSM内部就是把Java Web相关的技术进行封装,如果不知道Java Web基础的技术原理,又怎么能学好和写好SSM呢?
笔者认为,在从Java SE到SSM的过程中,关键的技术是Java Web开发,它能起到承上启下的作用。Java Web能把Java SE传统的控制台开发方式转移到基于B/S架构的Web开发,能把从Java SE中学习的技术点应用到实际的Web场景。学习Java Web后,读者能立即做一些小项目,如记事本、博客、留言板、企业网站等,增加了他们继续学习的信心。当看到自己写的程序成功运行在互联网上时,那种学会之后的成就感和自信心,只有经历过的人才能体会。
本书的写作风格是以案例的形式结合手把手式的教学,每一个小节都是一个技术点,每一章就是一个学习目标和学习结果。本书由浅入深地介绍知识点,中间还穿插一些浏览器开发者工具的使用,还深入Tomcat源代码探究技术的实现原理、剖析JDBC驱动源代码内部的细节等,力求尽可能多地介绍更有实战价值的知识点,让读者有所收获。
全书共分为16章:
第1章主要介绍IntelliJ IDEA开发工具的50多个常用的使用技巧,这些都是笔者在开发中高频率使用的,有些技巧能大幅提升开发效率。学习后,也许你会感叹IDE具有如此强大的功能,操作方便,插件丰富,可以对提升开发效率产生事半功倍的效果。
第2章主要介绍IntelliJ IDEA开发工具的核心技能,如调试程序代码、创建非Maven和Maven的Java Web项目、导出jar和war包文件、创建非Maven和Maven的多模块项目环境,还介绍了非Maven环境下的多Web模块的项目搭建,这些都是Java开发要创建的项目类型。本书基本上把常用的项目搭建场景都做了介绍,涵盖面较广。
第3章主要介绍JDBC的核心技术,包含JDBC接口的介绍、不同注册驱动写法的区别、使用JDBC实现基本的CURD操作、如何避免SQL注入、预编译的原理、JDBC使用finally的必要性、多条件查询、封装DAO类等。
第4章主要介绍JDBC的实战技术,本章也是学习JDBC的重点内容。可以说,MyBatis框架中提供的核心功能的内部实现在本章都有介绍,如JDBC结合高性能的连接池框架HikariCP、在JDBC中如何处理事务、转账操作发生异常时事务为什么不回滚及解决办法、使用JDBC操作CLOB和BLOB类型的数据、Batch批处理的使用、操作Date数据类型。另外,还介绍了ACID特性及对脏读、不可重复读和幻读的理论解释。为重要的是,本章用大量篇幅介绍了事务隔离性的代码实现,以及与脏读、不可重复读和幻读的关系,并配有完整的代码进行论证,遵守“少废话,上代码”的写作方式。
第5章主要介绍Servlet的核心技术,属于Java Web核心的技术,详细介绍了Servlet接口、ServletConfig接口和Servlet接口的关系,以及接口中全部API的应用实现,还详细介绍了HttpServletRequest和HttpServletResponse接口中常用API的使用,以及两种请求提交方式在传输内容及格式上的区别,并使用Servlet JDBC实现基于Web的CURD。
第6章主要介绍如何使用Cookie对象,在此基础上结合浏览器开发者工具,把Cookie在请求和响应中的传输过程进行可视化介绍,这样有助于读者学习HttpSession,因为HttpSession的技术原理就是Cookie。另外,还介绍了对Cookie进行CURD操作、在Cookie中读写中文等常用案例。
第7章主要介绍如何使用HttpSession接口,同时结合浏览器开发者工具,从内部执行流程上查看Cookie和HttpSession的关系和完整的处理过程,还介绍了HttpSession中的URL重写技术、使用HttpSession实现简易版购物车等案例。可以说,通过对本章内容的学习,读者会对HttpSession的原理有更加深入的了解。
第8章主要介绍如何使用ServletContext接口,介绍了ServletContext接口的使用场景、与初始化参数的结合使用、实现charset编码可配置等常用案例。
第9章主要介绍如何使用Filter接口,该接口是Java Web开发中比较常用的技术点,主要介绍了Filter的生命周期、私有/公共初始化参数的使用、使用注解声明Filter、过滤链、使用Filter实现编码处理、过滤转发和请求、实现权限验证、结合ThreadLocal对CookieTools进行解耦等常用的使用案例。
第10章主要介绍如何使用Listener接口,将常用的Listener接口结合代码进行详细介绍。
第11章主要介绍JSP,JSTL和EL技术,包含JSP和Servlet的关系、常用JSP指令的使用、JSP内部对象的使用、JSTL和EL的使用,以及设计纯正的基于MVC模式的分层应用。
第12章主要介绍异步处理Ajax技术,包含无参和有参、无返回值和有返回值等常见场景的使用、get()和post()两种方法的使用、异步和同步在执行上的区别、formdata和payload在提交格式上的区别、实现form有刷新和Ajax无刷新文件上传等实战案例。
第13章主要介绍搭建Maven Nexus私服环境,包含下载Nexus、安装Nexus、配置Nexus,还介绍了hosted,proxy和group仓库的区别及在使用上的联系,并结合IDEA实现RELEASE和SNAPSHOT版本的管理。
第14章主要介绍在IDEA中处理Maven项目的生命周期,并把IDEA中与Maven生命周期有关的菜单以案例的方式进行详细讲解。
第15章主要介绍Maven依赖的应用,包含依赖范围、依赖调解、可选依赖、排除依赖、集中处理版本、显示依赖结构、源代码打包、跳过测试等常用使用方式。
第16章主要介绍Maven的聚合与继承,包含使用聚合和继承的目的及优势,并在IDEA环境下创建这两种环境,目的是在实际的软件项目中更好地管理Maven项目。
虽然在此不能全部罗列本书讲解的技术点,但相信读者用心阅读本书后一定会有所收获。笔者对本书的整理花费大量精力,力求使Java Web技术核心的内容得以体现,因为不管是现阶段的SSM框架还是未来更高级Java Web框架的出现,它们的核心原理还是这些内容,因此,学好这些内容,再学习任何框架都不会怕。
本书的出版离不开背后辛勤工作的朋友,后,也要感谢我的家人,我的爸爸、妈妈和老婆,还有我可爱的儿子高晟京,看到你们为家庭默默地付出,我该做些什么予以报答呢?只有好好学习,好好工作!祝所有人身体健康。
高洪岩 于天津工业大学
2021-07-06
|
|