• 大小: 43.67MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-17
  • 语言: 其他
  • 标签: ssm  maven  

资源简介

MaVen-ssm学生信息管理系统,包含数据库等,可以用idea或者eclipse打开,

资源截图

代码片段和文件信息

package jee.support;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Main {
//
//    public static void main(String[] args) {
//
//        Ticket ticket =  new Ticket();
//        ticket.setMoney(“1533“).setDateCreated(new Date())
//                .setBody(“test“).setStatus(1);
//        System.out.println(ticket);

//        Ticket ticket = new Ticket();
//        ticket.setMoney(99.9f);
//        ticket.setDateCreated(new Date());
//
//        System.out.println(ticket);


//        EntityManagerFactory emf = Persistence.createEntityManagerFactory(
//                “EntityMappings“);
//
//        EntityManager manager = emf.createEntityManager();
//
//        Main mainer = new Main();
////        mainer.insertTickets(manager 20);
////         mainer.insertUsers(manager);
//        System.out.println(manager.find(User.class 1L).getEmail());
//        System.out.println(“总记录数:“ + mainer.findAll(manager).size());
//        System.out.println(“Hello World!“ + emf.toString());
//    }
//
//
//    public void insertTickets(EntityManager manager int n) {
//        EntityTransaction transaction =
//                manager.getTransaction();
//        transaction.begin();
//
//        //插入10条记录
//        for (int i = 0; i < 10; ++i) {
//            Date date = new Date();
//            Ticket ticket = new Ticket(“办公用品主题“ + i “2018购入商品一批“
//                    new Timestamp(date.getTime()) 50000.0f
//                    “商业汇票“);
//            ticket.setUserId(10L);
//            manager.persist(ticket);
//        }
//        transaction.commit();
//        System.out.println(“数据插入数据库“);
    }

//    public void insertUsers(EntityManager manager) {
//        EntityTransaction transaction =
//                manager.getTransaction();
//        transaction.begin();
//        User user1 = new User(“Nicholas“ “password“ (byte)1 “test1@123“ +
//                “.com“);
//        User user2 = new User(“Sarah“ “drowssap“ (byte)1 “test2@123.com“);
//        User user3 = new User(“Mike“ “wordpass“ (byte)1 “test3@123.com“);
//        User user4 = new User(“admin“ “123456“ (byte)1 “test4@123.com“);
//        User user5 = new User(“John“ “green“ (byte)1 “test5@123.com“);
//        User user6 = new User(“guest“ “guest“ (byte)1 “test6@123.com“);
//        manager.persist(user1);
//        manager.persist(user2);
//        manager.persist(user3);
//        manager.persist(user4);
//        manager.persist(user5);
//        manager.persist(user6);
//        transaction.commit();
//        System.out.println(“用户数据插入数据库“);
//    }
//
//
//    //获取所有记录
//    List findAll(EntityManager manager) {
//        List list = new ArrayList();
////
////        list =
////                (List) m

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-04-23 05:54  student_menager-master\
     目录           0  2019-04-23 05:54  student_menager-master\.idea\
     文件          15  2019-04-23 05:54  student_menager-master\.idea\.name
     目录           0  2019-04-23 05:54  student_menager-master\.idea\artifacts\
     文件         317  2019-04-23 05:54  student_menager-master\.idea\artifacts\Ch10_SpringMvc1_war.xml
     文件        6752  2019-04-23 05:54  student_menager-master\.idea\artifacts\Ch10_SpringMvc1_war_exploded.xml
     文件         642  2019-04-23 05:54  student_menager-master\.idea\compiler.xml
     目录           0  2019-04-23 05:54  student_menager-master\.idea\dictionaries\
     文件         144  2019-04-23 05:54  student_menager-master\.idea\dictionaries\he.xml
     文件         172  2019-04-23 05:54  student_menager-master\.idea\encodings.xml
     目录           0  2019-04-23 05:54  student_menager-master\.idea\libraries\
     文件         474  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__antlr_antlr_2_7_7.xml
     文件         656  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__com_fasterxml_jackson_core_jackson_annotations_2_8_2.xml
     文件         607  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__com_fasterxml_jackson_core_jackson_core_2_8_2.xml
     文件         635  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__com_fasterxml_jackson_core_jackson_databind_2_8_2.xml
     文件         700  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__com_fasterxml_jackson_datatype_jackson_datatype_jsr310_2_8_2.xml
     文件         573  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__com_github_jsqlparser_jsqlparser_0_9_5.xml
     文件         573  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__com_github_pagehelper_pagehelper_4_1_4.xml
     文件         548  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__commons_codec_commons_codec_1_9.xml
     文件         570  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__commons_logging_commons_logging_1_2.xml
     文件         474  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__dom4j_dom4j_1_6_1.xml
     文件         609  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__javax_annotation_javax_annotation_api_1_2.xml
     文件         535  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__javax_el_javax_el_api_3_0_0.xml
     文件         523  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__javax_inject_javax_inject_1.xml
     文件         590  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__javax_servlet_javax_servlet_api_3_1_0.xml
     文件         634  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__javax_servlet_jsp_javax_servlet_jsp_api_2_3_1.xml
     文件         689  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__javax_servlet_jsp_jstl_javax_servlet_jsp_jstl_api_1_2_1.xml
     文件         620  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__javax_transaction_javax_transaction_api_1_2.xml
     文件         598  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__javax_websocket_javax_websocket_api_1_0.xml
     文件         467  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__junit_junit_4_12.xml
     文件         579  2019-04-23 05:54  student_menager-master\.idea\libraries\Maven__mysql_mysql_connector_java_5_1_8.xml
............此处省略1309个文件信息

评论

共有 条评论