之前很少使用这样的一个对象BigDecimal,今天在改需求的时候遇到了,结果坑爹的怎么相加最后都为零。 代码如下: BigDecimal totalAmount = new BigDecimal(0); totalAmount.add(new BigDecimal(5000)); System.o ...
分类:
编程语言 时间:
2020-07-28 22:28:18
阅读次数:
174
spring会在上下文中自动寻找,并自动给bean装配属性 自动装配的三种方式 (1).在xml中显式的装配 (2).在java中显式的装配 (3).隐式的自动装配bean 这里主要讲第三种 1.测试环境搭建 public class Cat { public void bark(){ System ...
分类:
编程语言 时间:
2020-07-28 22:25:03
阅读次数:
70
方法的可变参数: 方法中有无参方法,有带参方法,都多个参数的方法;代码如下: public class Dome { /* 方法无参和带参 */ public static void method() { System.out.println("我是一个无参的方法"); } public stati ...
分类:
其他好文 时间:
2020-07-28 22:21:42
阅读次数:
100
Json 转 Model 引用 using Newtonsoft.Json; T Model= JsonConvert.DeserializeObject<T> (JsonString ); Model 转 Json 引用 using System.Web.Script.Serialization; ...
Java中Method类和invoke方法详解 在说Method和invoke的使用之前我们来看一个小例子, 如果看懂了那就ok了 public class MethodInvoke { class Animal { public void print() { System.out.println( ...
分类:
编程语言 时间:
2020-07-28 17:01:19
阅读次数:
75
#ifndef MY_BIGN_H#define MY_BIGN_H 1#pragma GCC system_header#include<cstring>#include<algorithm>#include<iostream>using std::max;using std::istream;u ...
分类:
其他好文 时间:
2020-07-28 16:52:02
阅读次数:
67
CentOS(Community ENTerprise Operating System)是Linux发行版之一,它是来自于Red Hat Enterprise Linux依照开放源代码规定释出的源代码所编译而成。由于出自同样的源代码,因此有些要求高度稳定性的服务器以CentOS替代商业版的Red ...
分类:
系统相关 时间:
2020-07-28 14:36:01
阅读次数:
84
//C#计算两个时间年份月份差 DateTime dt1 = Convert.ToDateTime("2008-8-8"); DateTime dt2 = System.DateTime.Now; int Year = dt2.Year - dt1.Year; int Month = (dt2.Ye ...
解决方案:新建文件log4j.properties log4j.rootLogger=DEBUG, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apach ...
分类:
移动开发 时间:
2020-07-28 14:33:05
阅读次数:
149
cifs协议是windows与linux系统之间文件共享的一种协议,其中代表的软件是samba。cifs全称是common internet file system通用互联网文件系统协议。 linux服务端samba主程序包samba [root@x160 ~]# yum install -y sa ...
分类:
其他好文 时间:
2020-07-28 13:51:03
阅读次数:
101