摘要:
两个实体类对应的数据库table需要拥有相同的主键. 比如A类和B类,A有属性id,B类也有相同属性id. 在A类中设置属性 B b; 在B类中设置属性 A a; 在表格A和B中,id都是主键. 在B中id不仅是主键还是外键. 此时对于A的配置文件如: <id name="id" column="i
阅读全文
posted @ 2018-06-27 17:31
宛如ZZ
阅读(456)
推荐(0)
摘要:
作曲 : Katy Perry, Łukasz Gottwald, Max Martin, Joshua Coleman 作词 : Katy Perry, Łukasz Gottwald, Max Martin, Joshua Coleman 作词 : Katy Perry, Łukasz Gott
阅读全文
posted @ 2018-06-27 16:09
宛如ZZ
阅读(394)
推荐(0)
摘要:
new BigDecimal(int i); BigDecimal.parseBigDecimal(String.valueOf(int i));
阅读全文
posted @ 2018-06-27 10:49
宛如ZZ
阅读(30676)
推荐(0)
摘要:
1. 新建一个GridNode的类: 2. 网页内新建一个table元素. 3. script代码 4. 服务器网页的Java代码 a>导入GridNode的javaBean b>新建ArrayList<GridNode>: List<GridNode> list = new ArrayList<G
阅读全文
posted @ 2018-06-24 18:31
宛如ZZ
阅读(585)
推荐(0)
摘要:
0.效果图 1. 一个id为mytree的无序列表 2. script语句 3. demo6_data.json 内的代码 [{ "id":1, "text":"功能菜单", "children":[{ "id":11, "text":"投票管理", "children":[{ "id":111,
阅读全文
posted @ 2018-06-24 18:00
宛如ZZ
阅读(1088)
推荐(0)
摘要:
1.使用<img>标签将图片都写在网页上. 2.使用jquery.lazyload.js的jquery文件中的函数lazyload() 3.效果,只有下拉到目标位置时,才会加载图片,如果没有缓存,会有一个延迟加载的圈圈.
阅读全文
posted @ 2018-06-24 17:51
宛如ZZ
阅读(1227)
推荐(0)
摘要:
通过id取input标签对象,调用autocomplete方法 {source:sources}将多个sources的String类型数组,包装成JSON. Ajax服务器端完成: 服务器端网页的Java代码,也只有java代码. String query = request.getParamete
阅读全文
posted @ 2018-06-24 17:47
宛如ZZ
阅读(1094)
推荐(0)
摘要:
一. 简述: 对一个层级的ul/ol进行调用menu()函数,即可简单做成层叠列表. 二. 实例: jquery/js代码: 1.其中多个list item需要使用<li>标签. 2.<li>内嵌多个list item时,需要外面套一个ul/ol,如果有多个,只加载最后一个. 3.列表有两种显示方式
阅读全文
posted @ 2018-06-24 16:46
宛如ZZ
阅读(785)
推荐(0)
摘要:
无序列表: 1. unordered list 以<ul>开头,以</ul>结果. 每个list item 以<li> tag开头. 2. 样式: bullet(小黑圆圈) Choose List Item Marker The CSS list-style-type property is use
阅读全文
posted @ 2018-06-24 16:09
宛如ZZ
阅读(1127)
推荐(0)
摘要:
我选用的是byte[] +@Lob 刚开始采用的java.sql.Blob,将上传的图片getBytes()后,通过Hibernate.getLobCreator(HibernateSessionFactory.getSession()).createBlob(new byte[] (pic.get
阅读全文
posted @ 2018-06-21 20:05
宛如ZZ
阅读(848)
推荐(0)
摘要:
实体类中无需构造函数. Since we haven’t specified a constructor, Java will provide a default constructor that will set all instance fields to their null values.
阅读全文
posted @ 2018-06-21 14:32
宛如ZZ
阅读(124)
推荐(0)
摘要:
调用类中的属性,通过get方法调用,而非其属性名调用. 比如A类中有属性a1,a1的get方法是getA1Method(); 相应Action类中的get方法是getA1Action(). 那么需要通过: <s:property value="a1Method" />不能调用, 而是a1Action
阅读全文
posted @ 2018-06-21 11:06
宛如ZZ
阅读(953)
推荐(0)
摘要:
My name is Sutter Keely, and I'm 18 years old. Compared to other kids, I haven't had that many hardships. Not really. You know, Stuff's happened. But
阅读全文
posted @ 2018-06-13 20:50
宛如ZZ
阅读(204)
推荐(0)
摘要:
Persistence contexts org.hibernate.Session API and javax.persistence.EntityManager API represent a context for dealing with persistent data. This conc
阅读全文
posted @ 2018-06-13 10:43
宛如ZZ
阅读(183)
推荐(0)
摘要:
Data Manipulation Language, DML 数据操纵语言Insert update delete CRUD :create read update delete
阅读全文
posted @ 2018-06-11 20:22
宛如ZZ
阅读(597)
推荐(0)
摘要:
说明:slesecByPriomaryKey是通过empno来获得Emp对象. 前台1: 后台1: 1.将empno=7788作为参数传入给getEmp(int empno)方法, data :empno=7788 中的empno和形参必须保持一致. 不能因为只有一个参数而写成"7788"或者778
阅读全文
posted @ 2018-06-09 15:03
宛如ZZ
阅读(4828)
推荐(0)
摘要:
var mycode="<%=session.getAttribute("code")%>"; 说明:session中设置过setAttribute("code",sessionVar); 但是获取的好像只能是字符串.
阅读全文
posted @ 2018-06-08 10:35
宛如ZZ
阅读(1750)
推荐(0)
摘要:
返回值是true/false method 1: 其中accept为复选框的id. 或者可以替换为:
阅读全文
posted @ 2018-06-07 23:13
宛如ZZ
阅读(698)
推荐(0)
摘要:
保存数据到服务器,成功时显示信息。
阅读全文
posted @ 2018-06-07 17:26
宛如ZZ
阅读(283)
推荐(0)
摘要:
将#{}换成'${}'然后拼接%等.
阅读全文
posted @ 2018-06-07 15:33
宛如ZZ
阅读(188)
推荐(0)
摘要:
platform: mysql workbench 8.0 error log: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disa
阅读全文
posted @ 2018-06-06 20:03
宛如ZZ
阅读(278)
推荐(0)
摘要:
1.: forward转发请求to another resource (可能是jsp, html,等). 语法: <jsp:forward page="relativeURL | <%= expression %>" /> Syntax of jsp:forward action tag with
阅读全文
posted @ 2018-06-05 14:06
宛如ZZ
阅读(152)
推荐(0)
摘要:
HttpServlet需要tomcat等. 右键project点开properties>project facets> 在右侧栏的Runtime tab中勾选tomcat或者新建tomcat服务器. Apply and close.
阅读全文
posted @ 2018-06-05 09:31
宛如ZZ
阅读(131)
推荐(0)
摘要:
1. Autowire可以让你隐式地注入依赖.(it internally uses setter or constructor injection) 2.优点:减少代码量. 3.缺点:无法被程序员控制. 不能用在基本数据类型和string值. 4. Autowiring Modes模式 byNam
阅读全文
posted @ 2018-06-02 17:42
宛如ZZ
阅读(335)
推荐(0)
摘要:
DI Dependency Injection 依赖注入:从程序代码中移除依赖关系的一种设计模式. 这样就可以更容易地管理和测试应用程序. DI使我们的程序编码 loosely coupled.松耦合. 为了更好地理解DI,先了解 Dependency Lookup (DL): Dependency
阅读全文
posted @ 2018-06-02 17:30
宛如ZZ
阅读(424)
推荐(0)
摘要:
ran during my bad network connection, it' s more that just 5 minutes. 1. execute "mvn archetype:generate" wait several minutes or just download the ar
阅读全文
posted @ 2018-06-01 19:01
宛如ZZ
阅读(183)
推荐(0)
摘要:
The next section documents the directory layout expected by Maven and the directory layout created by maven. 尽量根据此结构.当然,也可以通过project desciptor来覆写. 在最上
阅读全文
posted @ 2018-06-01 19:00
宛如ZZ
阅读(193)
推荐(0)
摘要:
使用Spring面向切面编程 1.介绍 AOP是OOP的补充,提供了另一种关于程序结构的思路. OOP的模块化的关键单位是 类 . AOP的则是aspect切面. AOP 将程序的逻辑分成独立的块(叫做concern 重心,关注点). AOP是用来增加跨切重心(cross-cutting conce
阅读全文
posted @ 2018-05-30 22:14
宛如ZZ
阅读(154)
推荐(0)
摘要:
自动扫描: 在<beans>标签内, <context:annotation-config />允许使用注解 <context:component-scan base-package="test.sample.entity"></context:component-scan> 扫描test/samp
阅读全文
posted @ 2018-05-30 21:46
宛如ZZ
阅读(130)
推荐(0)
摘要:
ref:https://www.tutorialspoint.com/spring/spring_autowiring_byname.htm project:Working Set: Spring>Project:Spring02>的 entity>Person/User 和ApplicationC
阅读全文
posted @ 2018-05-30 17:13
宛如ZZ
阅读(781)
推荐(0)
摘要:
1. 该类在package org.springframework.context.support包下. 该包在4.0.1中封装在spring-context-***.jar中. 其无参构造函数的文档注释: * Create a new ClassPathXmlApplicationContext,
阅读全文
posted @ 2018-05-30 15:37
宛如ZZ
阅读(174)
推荐(0)
摘要:
事务 事务管理 事务管理器 Transaction Transactions TransactionManager
阅读全文
posted @ 2018-05-30 14:42
宛如ZZ
阅读(3254)
推荐(0)
摘要:
在mybatis中,SqlSessionFactory由SqlSessionFactoryBuilder创建. 在mybatis-spring中,是由SqlSessionFactoryBean创建的. 1.创建 注意SqlSessionFactoryBean实现了Spring的FactoryBean
阅读全文
posted @ 2018-05-30 11:02
宛如ZZ
阅读(10387)
推荐(1)
摘要:
<url-pattern>/*</url-pattern> The /* on a servlet overrides all other servlets, including all servlets provided by the servletcontainer such as the de
阅读全文
posted @ 2018-05-30 00:09
宛如ZZ
阅读(177)
推荐(0)
摘要:
MySQL: String Driver="com.mysql.jdbc.Driver"; //驱动程序 String URL="jdbc:mysql://localhost:3306/db_name"; //连接的URL,db_name为数据库名 String Username="username
阅读全文
posted @ 2018-05-29 22:37
宛如ZZ
阅读(426)
推荐(0)
摘要:
utf-8 时变化长度的编码,储存一个code point 需要1~4个字节. 然而,mysql的utf8只存储最多3个字节per code point. 所以,utf8字符集不能存储所有的unicode code points. 只能从0x000 to 0xFFFF(叫做Basic Multili
阅读全文
posted @ 2018-05-26 19:43
宛如ZZ
阅读(938)
推荐(0)
摘要:
1. 使用强密码加密授权(推荐) 8.0提供的心的授权方式,采用SHA256基础的密码加密方法. 但是需要新版本的connector,目前和Connector/J最新的时8.0 目前8.0的连接器和使用libmysqlclient8.0的社区驱动都支持这种新方法. 如果客户端和应用程序不能更新来支持
阅读全文
posted @ 2018-05-26 18:21
宛如ZZ
阅读(13921)
推荐(1)
摘要:
字面意思: a loop at the back of a boot,used to pull it on. 穿鞋子脚后跟的环,叫做拔靴带. boot·strap ˈbo͞otˌstrap/ noun noun: bootstrap; plural noun: bootstraps 1. a loo
阅读全文
posted @ 2018-05-26 18:16
宛如ZZ
阅读(418)
推荐(0)
摘要:
Batch /baCH/ 1.a quantity of goods produced at one time. 翻译称批量,但并不算特别合适. 通常和批处理有关.
阅读全文
posted @ 2018-05-26 18:16
宛如ZZ
阅读(618)
推荐(0)
摘要:
MySQL Shell 是一个高级的命令行客户端以及代码编辑器for Mysql. 除了SQL,MySQL Shell也提供脚本能力 for JS and Python. When MySQL shell is conected to the MySQL server throught the X
阅读全文
posted @ 2018-05-26 18:11
宛如ZZ
阅读(594)
推荐(0)