idea创建spring
来源:互联网 发布:店铺做账用那个软件 编辑:程序博客网 时间:2024/06/05 12:47
spring 需要4+1 :beans、core、context、expression、commons-logging
AOP: aop联盟、spring aop、aspect规范、spring aspect
db: jdbc、tx
测试: text
web开发: spring web
启动:mysql
连接池:c3p0
************************************************
spring注解配置报错:
cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'context:component-scan' 的声明
少了那个配置那个;
AOP: aop联盟、spring aop、aspect规范、spring aspect
db: jdbc、tx
测试: text
web开发: spring web
启动:mysql
连接池:c3p0
************************************************
spring注解配置报错:
cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'context:component-scan' 的声明
少了那个配置那个;
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"> <context:component-scan base-package="com.scau.beyondboy.demo_b"></context:component-scan>
提供3个@Component注解衍生注解(功能一样)取代<bean class="">@Repository :dao层@Service:service层@Controller:web层3.依赖注入 ,给私有字段设置,也可以给setter方法设置 普通值:@Value("") 引用值: 方式1:按照【类型】注入 @Autowired 方式2:按照【名称】注入1 @Autowired @Qualifier("名称") 方式3:按照【名称】注入2 @Resource("名称")4.生命周期 初始化:@PostConstruct 销毁:@PreDestroy5.作用域 @Scope("prototype") 多例
spring创建参考网址: http://www.voidcn.com/article/p-dtmttqga-bma.html
阅读全文
0 0
- idea创建spring
- Idea 创建spring mvc例子
- idea创建spring-mvc项目
- idea创建spring boot项目
- IDEA 创建Spring mvc 项目
- 四、idea创建spring boot
- IntelliJ idea创建spring mvc项目
- 使用 idea 创建一个spring demo
- 使用IDEA创建一个Spring Boot项目
- 在IDEA里创建Spring Boot项目
- Intellij IDEA 2017 创建Spring Maven项目
- IDEA 创建Spring MVC + MAVEN 项目
- IDEA 创建spring boot项目无法启动
- IDEA中创建MAVEN spring mvc项目
- 关于idea创建Spring 的一些基础知识
- 在IntelliJ IDEA中创建Spring项目
- IntelliJ IDEA创建Spring Maven 项目
- 1.Spring Boot创建SSM(IDEA+ORACLE)
- C# 学习——静态(第四天)
- Anonymous Inner Class(匿名内部类)是否可以继承其它类?是否可以实现接口?【Java面试题】
- ARM分类
- 自用整理资源插件
- mac远程连接----->>>teamviewer
- idea创建spring
- handlerThread使用场景分析及源码解析
- iOS 网络
- Android内存泄漏的八种可能
- 实用前端JS工具类(验证,AJAX请求封装,分页插件等)真实项目使用
- Linux基本命令
- ecshop添加类似于精品,新品,热销的模块
- 获取元素方式
- 常用正则表达式大全