- 博客(13)
- 收藏
- 关注
原创 push to origin/master was rejected错误
在push项目到码云时出现了这个问题。分析原因是因为文件数超过了一次上传限制,查证解决果不其然。。解决方法点击Terminal输入:git pull origin master -f这时会提示输入码云的账号和密码,依次输入再次push即可成功push...
2020-04-13 00:45:57 184
原创 请求访问WEB-INF下的jsp
在编写代码时遇到了这样一个问题,我想在通过一个按钮跳转到WEB-INF下的jsp页面 <script type="text/javascript"> function tianjia() { window.location.href="${pageContext.request.contextPath}/WEB-INF/views/user/a...
2020-04-08 11:25:40 383
原创 给button按钮绑定单机事件
正在学习SpringMVC,想要完成点击添加按钮跳转到add方法,实现如下<%--button按钮绑定个单击事件--%><button onclick="tianjia()">添加用户</button><script type="text/javascript"> function tianjia() { ...
2020-04-07 17:47:14 1075
原创 Mybatis逆向工程
简单点说,就是通过数据库中的单表,自动生成java代码。Mybatis官方提供了逆向工程可以针对单表自动生成mybatis代码(mapper.java\mapper.xml\po类)下载逆向工程https://github.com/mybatis/generator/releases/tag/mybatis-generator-1.3.2第一步 创建generator.xml配置文件&...
2020-04-01 23:06:36 144
原创 Mybatis整合Spring
所需导入的jar包配置mybatis核心配置文件<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config...
2020-04-01 22:55:40 135
原创 Mybatis_整合ehcache
ehcache配置文件 ehcache.xml<?xml version="1.0" encoding="UTF-8"?><ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcach...
2020-04-01 14:10:06 115
原创 错误_Mybatis全局配置文件的标签顺序
元素类型为 “configuration” 的内容必须匹配 “(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,plugins?,environments?,databaseIdProvider?,mappers?)”。错误原因:mybatis的全局配置文件中configu...
2020-04-01 13:42:16 306
原创 Mybatis之Resultmap
<!--column不做限制,可以为任意表的字段,而property须为type 定义的pojo属性--><resultMap id="唯一的标识" type="映射的pojo对象"> <id column="表的主键字段,或者可以为查询语句中的别名字段" jdbcType="字段类型" property="映射pojo对象的主键属性" /> <...
2020-03-31 15:10:39 97
原创 Mybatis传入list集合
映射文件中<select id="findAllUserByList" parameterType="java.util.List" resultType="user"> select * from USER <where> <if test="list !=null and list.size>0"&g...
2020-03-31 13:53:08 230
原创 Mybatis的ParameterType传递参数
不写parameterType,用index传参public List<User> findUserList(String username,String sex);<!--parameterType不传参,在下面的#{}中用index传递参数--> <select id="findUserList" resultType="user" > ...
2020-03-30 12:45:29 141
原创 Mybatis入门__配置文件和映射文件
Mybatis配置文件SqlMapConfig.xml<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-conf...
2020-03-29 20:31:39 251
原创 AspectJ
AOP全自动编程(AspectJ)**切入点表达式:**execution(修饰符 返回值 包.类.方法名)AspectJ的通知类型before前置通知afterRuning:后置通知around:环绕通知afterThrowing:抛出异常通知after:最终通知代码xml文件中 <bean id="userService" class="cn.sky.Servic...
2020-03-26 17:03:22 125
原创 Spring中的代理模式
Spring中代理模式的学习使用jdk动态代理UserService proxyService=(UserService)Proxy.newProxyInstance(MyBeanFactory.class.getClassLoader(), service.getClass().getInterfaces(), new Invo...
2020-03-26 17:01:45 234
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人