Giter VIP home page Giter VIP logo

brms_ssm's Introduction

BRMS-SSM后端

使用技术

Spring+SpringMVC+MyBatis+Shiro+MAVEN+PageHelper

开发环境

系统:Windows 10专业版

IDE:IntelliJ IDEA 2019.3 x64

数据库:MySQL 5.7

其它(笔记)

  • @Autowired@Resource注解的区别
  1. @Autowired与@Resource都可以用来装配bean. 都可以写在字段上,或写在setter方法上。
  2. @Autowired默认按类型装配(这个注解是属业spring的),默认情况下必须要求依赖对象必须存在, 如果要允许null 值,可以设置它的required属性为false,如:@Autowired(required=false) , 如果我们想使用名称装配可以结合@Qualifier注解进行使用,如下:

@Autowired() @Qualifier("baseDao")
private BaseDao baseDao;

  1. @Resource(这个注解属于J2EE的),默认按照名称进行装配,名称可以通过name属性进行指定, 如果没有指定name属性,当注解写在字段上时,默认取字段名进行按照名称查找, 如果注解写在setter方法上默认取属性名进行装配。 当找不到与名称匹配的bean时才按照类型进行装配。 但是需要注意的是,如果name属性一旦指定,就只会按照名称进行装配。

brms_ssm's People

Contributors

yinyicao avatar dependabot[bot] avatar

Stargazers

chaoshan 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.