maven 使用问题记录
来源:互联网 发布:淘宝网天天特价连衣裙 编辑:程序博客网 时间:2024/05/22 23:27
maven 插件
Author : Janloong Do_O
maven-compline-plugin 找不到jar包
使用maven管理idea的web项目时,如果引用了pom依赖之外的jar包,在使用maven-compline 时会出现找不到对应的jar包内容的编译错误。是因为maven在编译的时候默认没有编译pom以外的内容需要在pom中的plugin配置中添加额外的编译路径例:第三方jar包放在webroot/WEB-INF/下添加 编译参数设置, <extdirs>${basedir}/src/main/webapp/WEB-INF/lib</extdirs>
完整设置参照:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> <compilerArguments> <verbose /> <extdirs>${basedir}/src/main/webapp/WEB-INF/lib</extdirs> <bootclasspath>${java.home}/lib/rt.jar:${java.home}/lib/jce.jar</bootclasspath> </compilerArguments> </configuration></plugin>
maven 多profile 的filter properties 文件中文乱码问题
未使用filter注入配置文件的时候中文读取显示正常但通过filter注入时,属性文件却显示中文乱码,这里在maven插件配置编码正常的情况下,经过排查发现是在此注入条件下,java在读取配置文件的时候发生编码错误。解决方法为:读取配置文件的时候应该将流转换为UTF-8格式读取Properties prop=new Properties();prop.load(new InputStreamReader(Client.class.getClassLoader().getResourceAsStream("config.properties"), "UTF-8"));
阅读全文
0 0
- maven 使用问题记录
- maven + eclipse 问题记录
- maven + eclipse 问题记录
- maven + eclipse 问题记录
- maven问题记录
- maven + eclipse 问题记录
- maven + eclipse 问题记录
- maven + eclipse 问题记录
- maven + eclipse 问题记录
- maven+eclipse 问题记录
- Maven 问题网址记录
- maven + eclipse 问题记录
- maven + eclipse 问题记录
- Idea使用Maven创建多模块SpringBoot项目问题记录
- 使用maven管理项目的一些问题处理记录
- maven使用以及遇到的一些问题记录
- maven 使用记录
- maven使用记录
- 2017/12/19 第十天培训
- python 数据库导出excle 分sheet
- 给设计师的会议沟通完全指南
- Linux多线程之互斥锁
- 二、Spring Cloud简介
- maven 使用问题记录
- 关于二叉树的非递归遍历
- 向CMD窗口发送CTRL+C 只能第一次生效
- SCAU 8615 快乐
- 深度学习: marginal cost (边际成本)
- web前端第十天
- vue自定义图标
- java-SpringMVC框架导出Excel格式数据
- spring boot 配置freemarker及使用freemarker渲染页面