JAVA 第9页
在Windows上运行Apache Spark-Ddmit

在Windows上运行Apache Spark

这篇文章介绍如何在Windows上运行Apache Spark 。 一、环境要求 运行spark需要以下条件的支持: Java6+ Scala 2.10.x Hadoop 2.7.x 二、安装步骤 安装Jdk 7 或更高版本,设置Java_Home和Path环...
ddmit的头像-DdmitDdmit6年前
023590
使用commons-fileupload实现单个和多个文件上传-Ddmit

使用commons-fileupload实现单个和多个文件上传

对于实现文件上传功能来说,Commons-fileupload组件是一个不错的选择,本文使用它实现了单个文件及多个文件上传,这里将实现过程写出来与大家共享。 1.单个文件上传。 页面代码: <div id='c...
ddmit的头像-DdmitDdmit5年前
023480
Java使用Apache POI合并Excel连续相同内容的单元格-Ddmit

Java使用Apache POI合并Excel连续相同内容的单元格

环境: Apache POI 3.17; HSSFSheet; 目的: 对Excel表格中同一列,如果连续的两个或两个以上单元格的内容相同,则对这些单元格进行合并。 实现代码: /** * 合并指定Excel sheet页、指定列中...
ddmit的头像-DdmitDdmit6年前
023390
Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured解决办法-Ddmit

Failed to configure a DataSource: ‘url’ attribute is not specified and no embedded datasource could be configured解决办法

新建springboot项目启动出错:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. 出现错误的原因是我在官网[https://start...
ddmit的头像-DdmitDdmit6年前
023390
Java中Json对象、Json字符串和Json数组的区别-Ddmit

Java中Json对象、Json字符串和Json数组的区别

什么是JSON: JSON即JavaScript Object Natation,它是一种轻量级的数据交换格式,与XML一样,是广泛被采用的客户端和服务端交互的解决方案。 JSON对象: JSON中对象(Object)以{开始, 以}结束. 对...
ddmit的头像-DdmitDdmit6年前
023340
Java中使用ProcessBuilder启动、管理应用程序-Ddmit

Java中使用ProcessBuilder启动、管理应用程序

介绍 ProcessBuilder类是J2SE 1.5在java.lang中新添加的一个新类,此类用于创建操作系统进程,它提供一种启动和管理进程(也就是应用程序)的方法。在J2SE 1.5之前,都是由Process类处来实现进...
ddmit的头像-DdmitDdmit6年前
023010
Java中移动文件或目录的方法盘点-Ddmit

Java中移动文件或目录的方法盘点

import org.apache.commons.io.FileUtils; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.StandardCopyOp...
ddmit的头像-DdmitDdmit6年前
022870
Java中BigDecimal和String互转-Ddmit

Java中BigDecimal和String互转

1.String转BigDecimal ``` import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.NumberFormat; import java.text.ParsePosition; import java.util.Locale; /** * ...
ddmit的头像-DdmitDdmit6年前
022860
Java中保留小数(精确到小数点几位)-Ddmit

Java中保留小数(精确到小数点几位)

这里提供三种实现方式: 实现代码 import java.math.BigDecimal; import java.text.DecimalFormat; /** * @author 四个空格-https://www.4spaces.org/ */ public class JavaSetScale { public s...
ddmit的头像-DdmitDdmit6年前
022790
Spring注解@Controller和@RestController的区别?-Ddmit

Spring注解@Controller和@RestController的区别?

官方文档:Annotation Type RestController 解释说:A convenience annotation that is itself annotated with @Controller and @ResponseBody。 也就是@RestController注解相当于控制器前加@Co...
ddmit的头像-DdmitDdmit6年前
022771