4.0.0org.springframework.bootspring-boot-starter-parent2.1.6.RELEASEcom.testpage0.0.1-SNAPSHOTpageDemo project for Spring Boot1.81.1.10org.springframework.bootspring-boot-starterorg.springframework.bootspring-boot-starter-webcom.alibabadruid-spring-boot-starter${druid.version}org.mybatis.spring.bootmybatis-spring-boot-starter2.0.1com.github.pagehelperpagehelper-spring-boot-starter1.2.5org.projectlomboklombokcom.alibabafastjson1.2.28mysqlmysql-connector-javaorg.springframework.bootspring-boot-starter-testorg.springframework.bootspring-boot-maven-pluginorg.apache.maven.pluginsmaven-compiler-plugin1.81.8UTF-8
package cn.vp.config;
import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class MyBatisConfig {
@Bean
public ConfigurationCustomizer configurationCustomizer() {
return new ConfigurationCustomizer() {
@Override
public void customize(org.apache.ibatis.session.Configuration configuration) {
//-自动使用驼峰命名属性映射字段 userId user_id
configuration.setMapUnderscoreToCamelCase(true);
//使用列别名替换列名 select user as User
configuration.setUseColumnLabel(true);
}
};
}
}
四,dao层的建立
package cn.vp.dao;
import cn.vp.entity.Department;
import org.apache.ibatis.annotations.*;
@Mapper
public interface DepartmentDao {
@Insert("INSERT INTO `Department` (`departmentName`) VALUES (#{departmentName})")
public int addDepartment(Department department);
@Delete("DELETE FROM department where id=#{id}")
public int deleteById(Integer id);
@Update("UPDATE `Department` SET `departmentName`=#{departmentName} WHERE (`id`=#{id})")
public int updateDepartment(Department department);
@Select("SELECT * from department where id=#{id}")
public Department queryById(@Param("id") Integer id);
}
昨晚和朋友聊天,喝了点咖啡,由于我经常喝茶,很长时间没喝咖啡了,所以失眠了,于是起床读JVM规范,读完后在朋友圈发了一条信息:
JVM Run-Time Data Areas:The Java Virtual Machine defines various run-time data areas that are used during execution of a program. So
Spark SQL supports most commonly used features of HiveQL. However, different HiveQL statements are executed in different manners:
1. DDL statements (e.g. CREATE TABLE, DROP TABLE, etc.)
nginx在运行过程中是否稳定,是否有异常退出过?这里总结几项平时会用到的小技巧。
1. 在error.log中查看是否有signal项,如果有,看看signal是多少。
比如,这是一个异常退出的情况:
$grep signal error.log
2012/12/24 16:39:56 [alert] 13661#0: worker process 13666 exited on s
方法一:常用方法 关闭XML验证
工具栏:windows => preferences => xml => xml files => validation => Indicate when no grammar is specified:选择Ignore即可。
方法二:(个人推荐)
添加 内容如下
<?xml version=
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml&quo
最主要的是使用到了一个jquery的插件jquery.media.js,使用这个插件就很容易实现了。
核心代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.