赞
踩
建立相关外键,画出er图。
### 设置### log4j.rootLogger = debug,stdout,D,E 输出信息到控制抬 log4j.appender.stdout = org.apache.log4j.ConsoleAppender log4j.appender.stdout.Target = System.out log4j.appender.stdout.layout = org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{ yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n 输出DEBUG 级别以上的日志到=E://logs/error.log log4j.appender.D = org.apache.log4j.DailyRollingFileAppender log4j.appender.D.File = E://logs/log.log log4j.appender.D.Append = true log4j.appender.D.Threshold = DEBUG log4j.appender.D.layout = org.apache.log4j.PatternLayout log4j.appender.D.layout.ConversionPattern = %-d{ yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n 输出ERROR 级别以上的日志到=E://logs/error.log log4j.appender.E = org.apache.log4j.DailyRollingFileAppender log4j.appender.E.File =E://logs/error.log log4j.appender.E.Append = true log4j.appender.E.Threshold = ERROR log4j.appender.E.layout = org.apache.log4j.PatternLayout log4j.appender.E.layout.ConversionPattern = %-d{ yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://192.168.56.101:3306/library
user=kb07
pwd=ok
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <properties resource="database.properties"/> <typeAliases> <typeAlias type="cn.kgc.kb07.entity.User" alias="user"/> <typeAlias type="cn.kgc.kb07.entity.Books" alias="books"/> </typeAliases> <environments default="dev"> <environment id="dev"> <transactionManager type="JDBC"></transactionManager> <dataSource type="POOLED"> <property name="driver" value="${driver}"/> <property name="url" value="${url}"/> <property name="username" value="${user}"/> <property name="password" value="${pwd}"/> </dataSource> </environment> </environments> <mappers> <mapper class="cn.kgc.kb07.dao.UserDao"/> <mapper class="cn.kgc.kb07.dao.BooksDao"/> </mappers> </configuration>
package cn.kgc.kb07.entity; /** * @Author yanglitian * @Date 2020/6/15 * @Description */ public class Books { private int book_id; private String book_name; private double price; private int store; private String des; private int book_type; private String type_name; public String getType_name() { return type_name; } public void setType_name(String type_name) { this.type_name = type_name; } public int getBook_id() { return book_id; } public void setBook_id(int book_id) { this.book_id = book_id;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。