spring学习(29):xml配置规范

目录结构

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.geyao</groupId><artifactId>spring01geyao</artifactId><version>1.0-SNAPSHOT</version><dependencies><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>4.3.13.RELEASE</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>3.2.0.RELEASE</version></dependency><dependency><groupId>log4j</groupId><artifactId>log4j</artifactId><version>1.2.17</version></dependency><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.12</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>4.3.4.RELEASE</version><scope>test</scope></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>4.3.4.RELEASE</version><scope>test</scope></dependency></dependencies>
</project>

applictioncontext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"axmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"><!--bean元素:描述当前的对象需要由spring容器管理id属性:标识对象 未来在应用程序中可以根据id获取对象class对象:被管理的对象的全名--></beans>

log4j.properties

### 设置###
log4j.rootLogger = ERROR,stdout### 输出信息到控制抬 ###
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n
log4j.category.org.springframework.beans.factory=ERROR

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/424434.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

[dp] LeetCode 91. Decode Ways

输入&#xff1a;一个字符串&#xff0c;只包含0-9的字符。 输出&#xff1a;解码种类 规则&#xff1a;有一种信息映射规则 A->1,B->2…Z->26。 例如输入’1’&#xff0c;只能解码为A。 输入’12’&#xff0c;可以解码为’AB’&#xff0c;也可以是’L’&#xff0…

leetcode——背包问题汇总

本章来汇总一下leetcode中做过的背包问题&#xff0c;包括0-1背包和完全背包。 背包问题的通常形式为&#xff1a;有N件物品和一个最多能背重量为W 的背包。第i件物品的重量是weight[i]&#xff0c;得到的价值是value[i] 。求解将哪些物品装入背包里物品价值总和最大。0-1背包和…

[密码学基础][每个信息安全博士生应该知道的52件事]52.先进的应用概念 系统的大致安全需求

这是一系列博客文章中最新的一篇&#xff0c;该文章列举了“每个博士生在做密码学时应该知道的52件事”:一系列问题的汇编是为了让博士生们在第一年结束时知道些什么。我们希望学生知道从理论到实践的各个方面。但关键是你需要在密码学中考虑的不仅是对遵守规则的玩家的安全&am…

spring学习(32):使用junit4测试

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

[dp]Leetcode 5. Longest Palindromic Substring

输入&#xff1a;一个字符串s 输出&#xff1a;最长的回文子串 规则&#xff1a;“abba"是一个回文 分析&#xff1a;输入是"babad”&#xff0c;输出"bab"。这个问题不能再按照之前分段的思路解决&#xff0c;或者说完全按照之前的思路。 之前的思路是&a…

[密码学基础][每个信息安全博士生应该知道的52件事][Bristol52]38.隐蔽信道和侧信道的区别

这是一系列博客文章中最新的一篇&#xff0c;该文章列举了“每个博士生在做密码学时应该知道的52件事”:一系列问题的汇编是为了让博士生们在第一年结束时知道些什么。 隐蔽信道和侧信道是两种不同的信息泄露信道 隐蔽信道使用目的不是通信的机制。例如&#xff0c;写和检查文…

NFA和DFA的区别

NFADFA初始状态不唯一唯一弧上的标记字(单字符字/ε)字符(串)转换关系非确定确定对于每个NFA M都存在一个DFA M 使得 L(M) L(M) 转载于:https://www.cnblogs.com/masterchd/p/11061281.html

spring学习(33):id和name

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

线性回归与 logistic回归

线性回归 算法方程&#xff1a;hθ(x)∑i0nθixiθTxh_{\theta}(x)\sum_{i0}^{n} \theta_{i} x_{i}\theta^{T} xhθ​(x)∑i0n​θi​xi​θTx 损失函数&#xff1a;J(θ0,θ1,…,θn)12m∑i1m(hθ(x(i))−y(i))2J\left(\theta_{0}, \theta_{1}, \ldots, \theta_{n}\right)\f…

[高效时间管理] 番茄工作钟 windows版本

【背景】 2019年本人学会了记录每日时间&#xff08;将每日分割成半小时一段的时间&#xff09; &#xff0c;但似乎是为了完成而完成&#xff0c;效果不佳&#xff0c;手机端的番茄钟总是诱惑太多&#xff0c;就在准备tb计时器的时候&#xff0c;发现了宝藏软件。 个人整理知…

IDEA设置取消自动显示参数提示

IDEA设置取消自动显示参数提示 最近在使用IDEA的过程中&#xff0c;发现方法中一直显示形参名的提示&#xff0c;无法选中&#xff0c;也无法删除&#xff0c;基于不同人的使用习惯不同&#xff0c;有的人不喜欢这种提示&#xff0c;我也在网上寻找各种解决方案&#xff0c;由于…

spring学习(34):构造函数依赖注入

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

[高效时间管理]复盘篇

【背景】 2019年本人在公众号中阅读了《时间管理&#xff0c;这篇就够了》&#xff0c;学习了其中的内容并开始记录每日所做&#xff0c;偶尔晚上进行复盘&#xff0c;对督促学习和反思起到一定的作用&#xff0c;故向大家分享经验。 为什么要时间管理&#xff1f; 时间管理…

PHP内存管理机制与垃圾回收机制

转载&#xff1a;https://www.cnblogs.com/zk0533/p/5667122.html PHP内存管理机制 var_dump(memory_get_usage()); //获取内存 $a "laruence"; //定义一个变量 var_dump(memory_get_usage()); //定义变量之后获取内存 unset($a); …

139. Word Break

目录题目描述分析暴力搜索记忆化回溯动态规划题目描述 给定一个字符串数组作为词典&#xff0c;再给定一个字符串。判断一下用词典中的词是不是可以组成这个字符串。 注意&#xff1a;词典中的词可以使用多次&#xff1b;词典中不存在重复的词 例如&#xff1a; 输入: s “le…

spring学习(35):c名称空间注入

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…

Element-UI 表单验证规则rules 配置参数说明

官方文档 : https://github.com/yiminghe/async-validator转载于:https://www.cnblogs.com/itstac/p/11063125.html

[能力提升][费曼学习法]学习方法

【背景知识】 费曼学习法 费曼学习法可以简化为四个单词&#xff1a;Concept &#xff08;概念&#xff09;、Teach &#xff08;教给别人&#xff09;、Review &#xff08;评价&#xff09;、Simplify &#xff08;简化&#xff09;。 第一步&#xff1a;把它教给一个小孩…

338. Counting Bits

输入&#xff1a;一个正整数n 输出&#xff1a;一个数组 规则&#xff1a;输出的数组分别表示0<x<n0<x<n0<x<n&#xff0c;范围内x的二进制表示中有多少个1。 示例&#xff1a;输入2&#xff0c;输出[0,1,1]。 分析&#xff1a;这道题目很直观。如果计算数字…

spring学习(36):注入简单类型

目录结构 pom.xml <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation"http://maven.apache.org/P…