IntelliJ IDEA 创建maven web项目2(6)
来源:互联网 发布:jsoup实例源码 编辑:程序博客网 时间:2024/05/29 02:38
使用IntelliJ IDEA 创建maven web项目
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<localRepository>D:\repository</localRepository>
</settings>
从网上下载Maven3.3.9版本(可以更高),然后改写里面settings.xml。如上。
点击Enable Auto Import
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.5</version>
</dependency>
资源文件的访问
Properties properties =newProperties();
properties.load(getClass().getResourceAsStream("/mydb.properties"));
out.write("url:"+properties.getProperty("jdbc_url")+"\n");
out.write("username:"+properties.getProperty("jdbc_username")+"\n");
out.write("jdbc_password:"+properties.getProperty("jdbc_password")+"\n");
在需要测试的类中如下图所示:
阅读全文
0 0
- IntelliJ IDEA 创建maven web项目2(6)
- Intellij IDEA创建Maven Web项目
- Intellij IDEA创建Maven Web项目
- Intellij IDEA创建Maven Web项目
- Intellij IDEA 14 创建Maven Web项目
- IntelliJ IDEA 14 创建Maven Web项目
- Intellij IDEA创建Maven Web项目
- Intellij IDEA创建Maven Web项目
- Intellij IDEA +Maven创建Web项目
- Intellij IDEA创建Maven Web项目
- intellij idea创建maven web项目
- IntelliJ IDEA + Maven创建Java Web项目
- Intellij IDEA创建Maven Web项目
- Intellij IDEA创建Maven Web项目
- 使用intellij idea创建Maven Web项目
- Intellij IDEA创建Maven Web项目
- IntelliJ IDEA Maven创建Java Web项目
- 使用IntelliJ IDEA创建Maven Web项目
- LeetCode-Valid Parenthesis String
- 模式识别1-线性分类器(感知机)
- Codeforces 877 B Nikita and string
- 剑20-顺时针打印矩阵
- Linux 下用命令修改mysql5.6 编码格式
- IntelliJ IDEA 创建maven web项目2(6)
- mysql无法启动
- leetcode 120
- 模式识别2-线性分类器(最小二乘法)
- ListView自定义Adapter实现仿QQ界面
- 纯干货|史上最全科技公司分级盘点
- mybatis高级映射(一对一,一对多,多对多)
- fast-rcnn练习资料整理
- Linux命令(文件编辑器)