首选bootstrap,当然有了它只是有了一个基本的前端骨架,要像整站看起来漂亮大气,得多做做工作的!为了偷懒,推荐给大家一个Admin Template:AdminLTE Control Panel Template,正如作者介绍:Best open source admin dashboard & control panel theme. Built on top of Bootstrap 3, AdminLTE provides a range of responsive, reusable, and commonly used components.
head.jsp文件 将项目中所需要用到次数比较多的的插件,库等,同意放在一个jsp文件里面,命名为head.jsp文件,相当于一个全局的 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib uri="
PS:1:先介绍一下什么是Servlet? Servlet(Server Applet)是Java Servlet的简称,称为小服务程序或服务连接器,用Java编写的服务器端程序,主要功能在于交互式地浏览和修改数据,生成动态Web内容。 狭义的Servlet是指Java语言实现的一个接口,广义的Servlet是指任何实现了这个Servlet接口的类,一般情况下,人们将Servlet理解为后者。Servlet运行于支持Java的应用服务器中。从原理上讲,Servlet可以响应任何类型的请求,但绝大多数情况下S
项目源代码:https://github.com/nnngu/nguSeckill ---- 前端交互流程设计 对于一个系统,需要产品经理、前端工程师和后端工程师的参与,产品经理将用户的需求做成一个开
访问GitHub下载最新源码:https://github.com/gaussic/SpringMVCDemo
转载请注明出处:Gaussic(一个致力于AI研究却不得不兼顾项目的研究生) 。
当然,可以通过spring.resources.static-locations配置指定静态文件的位置。但是要特别注意,一旦自己指定了静态资源目录,系统默认的静态资源目录就会失效。所以系统默认的就已经足够使用了,尽量不要自定义。
前情提要 之前已经搭好的springMVC+myBatis项目骨架,详情请看–>传送门。
启动服务器之后,会默认访问index.jsp,在index.jsp中会请求"/emps",即EmployeeController.java中的getEmps方法:
http://download.macromedia.com/pub/labs/flex2_tag_library_jsp/flex2_tag_library_for_jsp.zip
tomcat类加载器设计结构如上图所示,上面三个Bootstrap加载器、Ext加载器、Application加载器是JVM加载器,下半部分的加载器才是tomcat自定义的加载器。
本来是想像之前一样继续跟新Mybatis,但由于种种原因,迟迟没有更新,快开学了,学了一个暑假,博客也更新了不少,我觉得我得缓缓,先整合一些案例练练,等我再成熟点理解再透彻点之后再详细更新,如果仅仅是为了更新博客而忽视质量的话,有违我的初心,所以我决定,暂时转移路线,整合一些案例,为了以后更新更好的博客而准备。
先引入bootstrap,为了防止每个网页都引入,单独把引入bootstrap写成一个网页,然后在其他网页中用jsp:include动态包含
博客的管理与用户的管理有许多的相似之处,但是另外多了外键的操作,下面做简单的说明。
tiles框架的工作 在springMVC工作流程中属于视图解析器 解析视图这一步。算是视图解析器的一个插件,作了视图解析这步的一部分工作。
SpringMvc默认就会默认去WEB-INF下查找默认规范的配置文件,像我这里配置的servlet-name是seckill-dispatchServlet的话,则默认会寻找WEB-INF一个名为seckill-dispatchServlet-Servlet.xml的配置文件
注:此文承接上一文:使用IntelliJ IDEA开发SpringMVC网站(一)开发环境
官方网站:https://www.layui.com/(已下线) 参考地址:http://layui.org.cn/demo/index.html(非官网)
这个项目使用 JavaWeb 相关的技术,摈弃了 JSP ,使用 HTML 配合 AJAX异步提交方式,完成了与后台的交互,前端界面主要依赖于Bootstrap 3 的前端框架,而后台部分使用的则是 Servlet 以及配合MySQL、Druid、 JDBCTemplate 完成数据的增删改查,对于数据的 json 格式处理 我们选择jackson技术
6.简单说下@ControllerAdvice和@RestController注解的区别
我现在要在404.jsp页面访问webapp/commons目录下面的css和js
ClassLoader是用来加载 Class 的。它负责将 Class 的字节码形式转换成内存形式的 Class 对象。
前面的例子我们使用的视图技术主要是JSP。JSP的优点是它是Java EE容器的一部分,几乎所有Java EE服务器都支持JSP。缺点就是它在视图表现方面的功能很少,假如我们想迭代一个数组之类的,只能使用<% %>来包括Java语句进行。虽然有标准标签库(JSTL)的补足,但是使用仍然不太方便。另外JSP只能在Java EE容器中使用,如果我们希望渲染电子邮件之类的,JSP就无能为力了。
今天给大家写一篇Web系列的文章,大部分人可能会觉得Web的东西很基础,如果这方面你很精通了可以忽略,但是我还是想出一系列的文章去帮助刚刚入门的小伙伴。
今天给大家讲的就是session项目,用到了昨天的那篇文章里面的一些东西。 今天就不多说了,可以看下面的思维导图。 📷 📷 下面是这个项目的效果图,用到了一些插件。 📷 📷 以下是代码 index.jsp主页面 <%@page import="com.zking.entity.Goods"%> <%@page import="java.util.ArrayList"%> <%@page import="com.zking.dao.GoodsDao"%> <%@ page language="java"
承接上文:JavaWeb课程复习资料(七)——select服务查询所有功能编写 1、添加【AddServlet】 📷 2、添加AddServlet编码 package com.item.servlet; import com.item.dao.UserInfoDAO; import com.item.daoimpl.UserInfoDAOImpl; import com.item.pojo.UserInfo; import javax.servlet.ServletException; import j
作为一个Web容器,Tomcat要解决什么问题 , Tomcat 如果使用默认的双亲委派类加载机制能不能行?
做一个项目的时候 ,控制台总是会出现各种bug,其实不用慌张,终结起来也就几种类型的错误,在开发中每次遇到错误都善于总结,下次在看到就会胸有成竹知道是什么情况了,以下是在开发过程中总结的一些错误以及错
ERROR – alina].[localhost].[/xplanner] – Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘metaRepository’ defined in class path resource [spring-beans.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.apache.commons.collections.map.LinkedMap] to required type [java.util.HashMap] for property ‘repositories’] PropertyAccessExceptionsException (1 errors) org.springframework.beans.TypeMismatchException: Failed to convert property value of type [org.apache.commons.collections.map.LinkedMap] to required type [java.util.HashMap] for property ‘repositories’ at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:839) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:584) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:469)
-web应用同样也需要一些初始化的参数,但 相对于每一个Servlet有一个ServletConfig来说,一个Web应用(确切的说是每个JVM)仅有一个ServletContext来存放这些参数,这个ServletContext对Web应用中的每个Servlet都可用。
PS:前面说了抽取框架的搭建,接着就要我们开始进入网址的时候就要查到全部信息并显示在首页,我们用到的MySql数据库,具体步骤是: 创建数据库,创建表,添加信息 项目中调入mysql的jar包 mys
自动转换类型 EL得到某个数据时可以自动转换类型 对于类型的限制更加宽松
工程目录 配置文件详解 Spring的applicationContext.xml文件 <?xml version="1.0" encoding="UTF-8"?> <beans
今天调试一个jboss应用的时候发现这个错误。 严重: Unable to instantiate ExpressionFactory 'com.sun.el.ExpressionFactoryImpl' 2008-9-12 11:36:47 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class
我们在开发前端页面的时候,如果每一个按钮、样式、处理浏览器兼容性的代码都要自己从零开始去写,那就太浪费时间了。所以我们需要一个框架,帮我们实现一个页面的基础部分和解决一些繁琐的细节,只要在它的基础上进行个性化定制就可以了。
SSM三大框架整合(Spring(4.2.0.RELEASE)+SpringMVC(4.2.0.RELEASE)+MyBatis(3.2.8))BootStrap-Table
因为Spring Boot其实是对Spring生态的封装整合打包,以简化开发中使用Spring框架。所以 Spring Boot在集成模板引擎过程中,其实就是对传统SpringMVC集成对应模板引擎的打包自动化配置。
简介 财务咨询网站,可以咨询公司代办,代理记账等一系列的财务问题的资讯服务网站 演示视频 https://www.bilibili.com/video/BV1T54y1H7Ar/?share_sour
承接上文:JavaWeb课程复习资料(九)——删除功能 目录 1、创建【UpdateByIdServlet.java】 2、创建【UpdateServlet.jsp】 3、创建【UpdateServlet.jsp】 4、执行测试 1、创建【UpdateByIdServlet.java】 📷 package com.item.servlet; import com.item.dao.UserInfoDAO; import com.item.daoimpl.UserInfoDAOImpl; import co
我们昨天完成了第一部分的开发,即项目搭建和登录、注册功能实现。今天本文将与读者一起实现用户列表的显示、部门模块的显示和头像上传功能。
第一节java入门 1-Java 背景介绍 2-Java 入门程序的编写 3-环境配置 4-基本概念介绍 5-类型转换 6-开发工具使用 第二节java基础 1-运算符的使用 2-键盘录入的练习 3-Java语法-判断 4-Java语法-循环一 5-Java语法-循环二 6-随机数获取和使用 7-数组简介 8-数组的使用 9-方法的定义和使用 10-方法的练习 11-断点调试 12-基础语法练习一 13-基础语法练习二 第三节面向对象 1-面向对象概述 2-类的定义和使用 3-关键字和访问权限 第四节核心A
1478763627140018779.jpg 1.ajax入门案例 1.1 搭建Web环境 ajax对于各位来说,应该都不陌生,正因为ajax的产生,导致前台页面和服务器之间的数据传输变得非常容易,同时还可以实现页面的局部刷新。通过在后台与服务器进行少量数据交换,AJAX 可以使网页实现异步更新。这意味着可以在不重新加载整个网页的情况下,对网页的某部分进行更新。 对于JavaWeb项目而言,ajax主要用于浏览器和服务器之间数据的传输。 如果是单单地堆砌知识点,会显得比较无聊,那么根据惯例,我先不继续介绍
注:如果出现【No suitable driver found for jdbc】类似的报错,找到自己的【mysql-connector-java-5.1.39.jar】包,放到对应的识别路径上就好。
使用联合查询避免同一用户多次秒杀同一商品(利用在插入购物明细表中的秒杀id和用户的唯一标识来避免)。
需要熟练掌握MySQL数据库,Spring,JavaWeb及MyBatis知识,简单的前端知识
近期正在探索前端、后端、系统端各类常用组件与工具,对其一些常见的组件进行再次整理一下,形成标准化组件专题,后续该专题将包含各类语言中的一些常用组件。欢迎大家进行持续关注。
领取专属 10元无门槛券
手把手带您无忧上云