Code Monkey home page Code Monkey logo

ssm's Introduction

ssm

1.spring+mybatis整合:

1.1 配置mybatis-config:

主要配置全局设置settring和别名alias,不需要配置mapper所在的链接,因为在spring配置中可以配置进行扫描mapper,必须遵循mapper.xml和mapper.java在同个目录下

1.2 spring.xml配置:

spring主要是管理mapper、service、controller的注册,即交给IOC容器

1.2.1 applicationContext-dao.xml:

  • 配置加载db.properties;
  • 配置数据源;
  • 配置sqlSessionFactory(引用的数据源,mybatis-config的位置)
  • 配置mapper扫描器

1.2.2 applicationContext-service.xml:

  • 配置service扫描包
  • 配置service事务

1.2.3 springmvc.xml:

  • 配置controller扫描包
  • 配置注解驱动
  • 配置视图解析器

2.web.xml:

  • 配置Spring监听器listener,监听spring启动,需要配置spring配置文件的位置
  • 配置filter utf-8
  • 配置dispatcherServlet,init-param中初始化加载springmvc.xml

ssm's People

Contributors

crayonist avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.