Wesley13 Wesley13
2年前
java8中的接口与时间操作
java8中接口可以有默认方法(用default修饰,可以有多个)和静态方法了。publicinterfaceTran{defaultpublicStringgetName(){return"zhangsan";}d
Easter79 Easter79
2年前
springboot2.X访问静态文件配置
config配置:@ConfigurationpublicclassWebMvcConfigimplementsWebMvcConfigurer{/跨域配置@return/@BeanpublicCo
Easter79 Easter79
2年前
SpringBoot2单元测试
引入maven依赖引入powermock是为了解决静态方法mock的问题。<dependency<groupIdorg.powermock</groupId<artifactIdpowermockmodulejunit4</artifactId<versi
Wesley13 Wesley13
2年前
Java 集合类
为什么使用集合数组长度是固定,如果要改变数组的长度需要创建新的数组将旧数组里面的元素拷贝过去,使用起来不方便。java给开发者提供了一些集合类,能够存储任意长度的对象,长度可以随着元素的增加而增加,随着元素的减少而减少,使用起来方便一些。数组和集合的区别区别1:数组既可以存储基本数据类型,又可以存储引用数据类型,基本数据类
Wesley13 Wesley13
2年前
Java static 静态方法 并发(是否线程安全)
publicclassTestUitl{publicstaticUsersetName(Useruser,Stringname){Useruuser;u.namename;returnu;}}
Stella981 Stella981
2年前
HttpClientUtil工具类
HttpClientUtil.javapackagecom.bjsxt.springboothelloworld;importjava.io.IOException;importjava.net.URI;importjava.util.ArrayList;importjava.util.
Easter79 Easter79
2年前
Spring加载资源文件并静态化
说明:     在实际项目中有时候需要用到很多的配置文件,而这些配置文件我们又想按功能分文件加载。第一步     我们需要在Spring的配置文件中加入一段配置,配置如下<beanid"propertyBean"class"com.funo.util.WcityProperty"<propertyname
Stella981 Stella981
2年前
SpringBoot 使用Thymeleaf解决静态页面跳转问题
参考:springboot配置跳转html页面(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fblog.csdn.net%2Fhzmhy123456%2Farticle%2Fdetails%2F69525280)1,首先在pom文件中引入模板引擎jar包<depende
Dive into TensorFlow系列(1)-静态图运行原理
接触过TensorFlowv1的朋友都知道,训练一个TF模型有三个步骤:定义输入和模型结构,创建tf.Session实例sess,执行sess.run()启动训练。不管是因为历史遗留代码或是团队保守的建模规范,其实很多算法团队仍在大量使用TFv1进