栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

项目开发过程记录

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

项目开发过程记录

第一天(—2022/2/6—)

SSM框架搭建,编写配置文件,数据库属性文件
配置文件

pom文件(引入依赖)


    4.0.0
    war

    org.example
    Fire
    1.0-SNAPSHOT

    
        8
        8
    

    
    
        
            org.springframework
            spring-webmvc
            5.3.14
        

        
            org.springframework
            spring-jdbc
            5.3.14
        


        
            org.springframework
            spring-aspects
            5.3.14
        



        
            org.mybatis
            mybatis
            3.5.3
        
        
            org.mybatis
            mybatis-spring
            2.0.2
        


        
        
            org.mybatis.generator
            mybatis-generator-core
            1.4.0
        

        
            com.github.pagehelper
            pagehelper
            5.0.0
        

        

        
            com.mchange
            c3p0
            0.9.5.2
        
        
            mysql
            mysql-connector-java
            5.1.47
        

        
            junit
            junit
            4.12
            test
        
        
            javax.servlet
            servlet-api
            2.5
            provided
        
        
            jstl
            jstl
            1.2
        
    


mybatis-config.xml



    
        
    
    
        
    

    
        
        
            
        
    

applicationContext.xml



    

    

    
    
        
        
        
        
    

    
        
        
        
    

    
        
    

    
        
    

    
        

        
    

    
        
            
            
        
    


dbconfig.properties
jdbc.jdbcUrl=jdbc:mysql://localhost:3306/book?useSSL=false&useUnicode=true&characterEncoding=utf-8
jdbc.driverClass=com.mysql.jdbc.Driver
jdbc.user=root
jdbc.password=123456
springmvc-servlet.xml






    

        
    

    
        
        
    

    
    
    

web.xml



    
        contextConfigLocation
        classpath:applicationContext.xml
    
    
        org.springframework.web.context.ContextLoaderListener
    


    
        DispatcherServlet
        org.springframework.web.servlet.DispatcherServlet
        
            contextConfigLocation
            classpath:springmvc-servlet.xml
        
        1
    
    
        DispatcherServlet
        /
    
    

    
        CharacterEncodingFilter
        org.springframework.web.filter.CharacterEncodingFilter
        
            encoding
            utf-8
        
        
            forceRequestEncoding
            true
        
        
            forceResponseEncoding
            true
        
    
    
        CharacterEncodingFilter
        /*
    


    
        HiddenHttpMethodFilter
        org.springframework.web.filter.HiddenHttpMethodFilter
    
    
        HiddenHttpMethodFilter
        /*
    
    

创建数据库(book) 使用MBG逆向工程 配置MBG.xml文件





    

        
            
            
        

        
        

        
            
        


        
            
            
        


        
            
        


        
            
        


        
(测试)MBG
public class MBGTest {
    public static void main(String[] args) throws Exception {
        List warnings = new ArrayList();
        boolean overwrite = true;
        File configFile = new File("MBG.xml");
        ConfigurationParser cp = new ConfigurationParser(warnings);
        Configuration config = cp.parseConfiguration(configFile);
        DefaultShellCallback callback = new DefaultShellCallback(overwrite);
        MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
        myBatisGenerator.generate(null);
    }
}

  • 自动生成是成功的,但是mbg配置文件中设置不生产注释无效,未知原因。 搭建bootStrap环境 引入bootstrap文件和jQuery文件

    编写首页

  • 转载请注明:文章转载自 www.mshxw.com
    本文地址:https://www.mshxw.com/it/731352.html
    我们一直用心在做
    关于我们 文章归档 网站地图 联系我们

    版权所有 (c)2021-2022 MSHXW.COM

    ICP备案号:晋ICP备2021003244-6号