---
title: "maven的properties"
author: "wwty"
date: "2011-03-22T22:40:10Z"
tags: []
categories: ["编程语言"]
slug: "maven-properties"
draft: false
lastmod: "2011-03-22T22:40:10Z"
id: 971115
url: "https://wwty.iteye.com/blog/971115"
---

定义property

```
        <properties>
                <org.springframework.version>3.0.5.RELEASE</org.springframework.version>
                <org.slf4j.version>1.6.1</org.slf4j.version>
        </properties>
```

 

使用：

```
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-webmvc</artifactId>
                        <version>${org.springframework.version}</version>
                </dependency>

                <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                        <version>${org.slf4j.version}</version>
                </dependency>
```