You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
899 B
Java
30 lines
899 B
Java
2 weeks ago
|
package com.supervision;
|
||
|
|
||
|
import com.supervision.domain.SysByteArray;
|
||
|
import com.supervision.service.SysByteArrayService;
|
||
|
import lombok.extern.slf4j.Slf4j;
|
||
|
import org.junit.jupiter.api.Test;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||
|
|
||
|
@Slf4j
|
||
|
@SpringBootTest
|
||
|
public class PlatformApplicationTest {
|
||
|
|
||
|
@Autowired
|
||
|
private SysByteArrayService sysByteArrayService;
|
||
|
@Test
|
||
|
void saveByteArray() {
|
||
|
SysByteArray sysByteArray = new SysByteArray();
|
||
|
sysByteArray.setBytes(new byte[]{1,2,3});
|
||
|
boolean save = sysByteArrayService.save(sysByteArray);
|
||
|
System.out.println("保存结果: " + save);
|
||
|
}
|
||
|
|
||
|
@Test
|
||
|
void queryByteArray() {
|
||
|
SysByteArray sysByteArray = sysByteArrayService.getById("1945676008645058562");
|
||
|
log.info("查询结果: {}", sysByteArray);
|
||
|
}
|
||
|
}
|