Easter79 Easter79
4年前
springmvc+mybaits一个事物同时update和调用存储过程异常回滚
事物作用的impl类这样写的@OverridepublicintupdateReturnAll(intitem,intstatus,intidUser){//TODOAutogeneratedmethodstubtry{
Easter79 Easter79
4年前
SpringBoot测试Service或者Dao层
!(https://oscimg.oschina.net/oscnet/3617716e29864749803145ac057d5c11f0c.gif)使用SpringBoot进行单元测试时,发现使用@Autowired注解的类无法自动注入,当使用这个类的实例的时候,报出NullPointerException,即空指针
Wesley13 Wesley13
4年前
Java多线程(一) —— 传统线程技术
一、传统线程机制1\.使用类Thread实现newThread(){@Overridepublicvoidrun(){while(true){
Stella981 Stella981
4年前
Golang Package
        Golang'slog模块主要提供了3类接口。分别是“Print、Panic、Fatal”,对每一类接口其提供了3中调用方式,分别是"Xxxx、Xxxxln、Xxxxf",基本和fmt中的相关函数类似,下面是一个Print的示例:packagemain
Wesley13 Wesley13
4年前
Java锁机制浅析之 AQS
  一、内部原理  类继承结构  Lockpackage相关API继承结构,忽略掉了一些类,以便观察其特点:  ReentrantLock和ReentrantReadWriteLock都是借助内部类Sync来实现Lock接口。ReentrantReadWriteLock没有直接实现Lock接口而是内置了读锁ReadLock和写锁Write
Stella981 Stella981
4年前
Gson、jackson 序列化,反序列化(单个、集合)
实体类:packagecom.nf.redisDemo1.entity;publicclassNews{privatelongid;privateStringtitle;privateStringbody;
Stella981 Stella981
4年前
Live555基础
1Live555组成LIVE555下包含LiveMedia、UsageEnvironment、BasicUsageEnvironment、GroupSock库,MediaServer简单服务器程序以及其他多个测试demo。LiveMedia库:包含一系列处理不同编码格式和封装格式的类。基类是Medium。
Stella981 Stella981
4年前
HADOOP 文件系统 之 AbstractFileSystem
抽象类publicabstractclassAbstractFileSystem{}位置:org.apache.hadoop.fs.AbstractFileSystem_ThisclassprovidesaninterfaceforimplementorsofaHadoopfilesystem(analogou
Stella981 Stella981
4年前
EntityFrameworkCore 中实体的几种配置方法
EntityFramework有几种方式可实现数据库表与实体的关系配置(relationship)1.convention2.annotation3.fluentapi使用数据注解实体类通常是在Models目录下,直接在实体类上添加属性注解,比如Required/Key等.
Stella981 Stella981
4年前
Spring Boot核心配置
!(https://oscimg.oschina.net/oscnet/c7cf65de97b540b49e7c39ebd3e9dfbd.png)启动类在包根目录下添加启动类,必须包含main方法,再添加SpringBoot启动方法:1.SpringApplicatio