idea配置maven+Spring+SpringMVC+mybatis+oracle

目录:

idea配置maven+Spring+SpringMVC+mybatis+oracle_第1张图片

 

完整目录:

idea配置maven+Spring+SpringMVC+mybatis+oracle_第2张图片

 

POM文件:



    4.0.0
    
        org.springframework.boot
        spring-boot-starter-parent
        2.1.7.RELEASE
         
    
    com.mall
    shop
    0.0.1-SNAPSHOT
    war
    shop
    Demo project for Spring Boot


    
        1.8

        UTF-8
        1.7
        1.7
        5.1.5.RELEASE
        
        3.4.5
        
        11.2.0
        
        1.7.18
        1.2.17

    

    
        
            org.springframework.boot
            spring-boot-starter-jdbc
        

        
            org.springframework.boot
            spring-boot-starter-web
        

        
            org.springframework.boot
            spring-boot-starter-webflux
        

        
            org.mybatis.spring.boot
            mybatis-spring-boot-starter
            2.1.0
        

        
            org.springframework.boot
            spring-boot-starter-tomcat
            provided
        

        
            org.springframework.boot
            spring-boot-starter-test
            test
        

        
            io.projectreactor
            reactor-test
            test
        

        
            junit
            junit
            4.11
            test
        

        
        
            org.springframework
            spring-core
            ${spring.version}
        

        
            org.springframework
            spring-web
            ${spring.version}
        

        
            org.springframework
            spring-oxm
            ${spring.version}
        

        
            org.springframework
            spring-tx
            ${spring.version}
        

        
            org.springframework
            spring-jdbc
            ${spring.version}
        

        
            org.springframework
            spring-webmvc
            ${spring.version}
        

        
            org.springframework
            spring-context
            ${spring.version}
        

        
            org.springframework
            spring-context-support
            ${spring.version}
        

        
            org.springframework
            spring-aop
            ${spring.version}
        

        
            org.springframework
            spring-test
            ${spring.version}
        

        
        
            org.mybatis
            mybatis
            ${mybatis.version}
        

        
        
            org.mybatis
            mybatis-spring
            1.3.0
        

        
        
            com.oracle
            ojdbc6
            ${oracle-driver.version}
        

        
        
            commons-dbcp
            commons-dbcp
            1.2.2
        

        
            log4j
            log4j
            ${log4j.version}
        

        
            org.mybatis.generator
            mybatis-generator-core
            1.3.5
        

        
            org.codehaus.jackson
            jackson-mapper-asl
            1.9.12
        

        
            org.codehaus.jackson
            jackson-core-asl
            1.9.12
        

        
            org.xmlunit
            xmlunit-core
        

        
            org.xmlunit
            xmlunit-core
        

        
            com.mchange
            c3p0
            0.9.5.2
        

        
            javax.servlet
            jstl
        

    

    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
            

            
                maven-clean-plugin
                3.1.0
            
            
            
                maven-resources-plugin
                3.0.2
            
            
                maven-compiler-plugin
                3.8.0
            
            
                maven-surefire-plugin
                2.22.1
            
            
                maven-war-plugin
                3.2.2
            
            
                maven-install-plugin
                2.5.2
            
            
                maven-deploy-plugin
                2.8.2
            

            
                org.eclipse.m2e
                lifecycle-mapping
                1.0.0
                
                    
                        
                            
                                
                                    org.apache.maven.plugins
                                    maven-enforcer-plugin
                                    [1.2,)
                                    
                                        enforce
                                    
                                
                                
                                    
                                
                            
                        
                    
                
            

            
            
                org.mybatis.generator
                mybatis-generator-maven-plugin
                1.3.5
                
                    src/main/resources/mybatis-generator/generatorConfig.xml
                    true
                    true
                
                
                    
                        Generate MyBatis Artifacts
                        
                            generate
                        
                    
                
                
                    
                        com.oracle
                        ojdbc6
                        ${oracle-driver.version}
                        runtime
                    

                    
                        org.mybatis.generator
                        mybatis-generator-core
                        1.3.5
                    
                
            
        

    


        
            
                src/main/java
                
                    **/*.properties
                    **/*.xml
                
                false
            
        

    


 

web.xml文件:





    Archetype Created Web Application


    
        contextConfigLocation
        classpath:application/spring-mybatis.xml
    


    
    
        
            org.springframework.web.context.ContextLoaderListener
        
    



    
    
        encodingFilter
        org.springframework.web.filter.CharacterEncodingFilter
        
            encoding
            UTF-8
        
        
            forceEncoding
            true
        
    
    
        encodingFilter
        /*
    
    
    
        
            org.springframework.web.util.IntrospectorCleanupListener
        
    


    
    
        SpringMVC
        
            org.springframework.web.servlet.DispatcherServlet
        
        
            contextConfigLocation
            classpath:application/spring-mvc.xml
        
        1
        
    
    
        SpringMVC
        
        /
    

    
    
        index.jsp
    

    
    
        20
    


 

mybatis-config.xml文件:




    
    
        
    

    
    
        
        
    

    
        
        
    

 

jdbc.properties文件:

#?接oracle数据?
driverClassName=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
username=scott
password=tiger
#定?初始?接数
initialSize=0
#定?最大?接数
maxActive=20
#定?最大空?
maxIdle=20
#定?最小空?
minIdle=1
#定?最?等待??
maxWait=60000

 

spring-mvc.xml文件:





    
    
        
    


    
    
    

    
    
        
        
        
    

    
    
    
    
    

 

spring-mybatis.xml文件:




    

    
        
    

    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    

    
        
        
    

    
    
        
        
    

    
    
        
    
    
    



 

页面启动:

设置tomcat启动

idea配置maven+Spring+SpringMVC+mybatis+oracle_第3张图片

 

idea配置maven+Spring+SpringMVC+mybatis+oracle_第4张图片

 

你可能感兴趣的:(项目总结)