使用jetbrains @NotNull注解

This commit is contained in:
myh 2023-10-07 18:51:52 +08:00
parent 556adcdc57
commit 6b7e9e7ecb
2 changed files with 2 additions and 7 deletions

View File

@ -1,15 +1,14 @@
package com.example.springdemo.dao; package com.example.springdemo.dao;
import com.example.springdemo.entities.Merchants; import com.example.springdemo.entities.Merchants;
import org.jetbrains.annotations.NotNull;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
@Repository @Repository
public interface MerchantsRepository extends JpaRepository<Merchants, Long> { public interface MerchantsRepository extends JpaRepository<Merchants, Long> {
List<Merchants> findByName(String name); List<Merchants> findByName(String name);
void deleteById(@NotNull Long id);
void deleteById(Long id);
} }

View File

@ -1,4 +0,0 @@
@NonNullApi
package com.example.springdemo.dao;
import org.springframework.lang.NonNullApi;