opt: 代码写法
This commit is contained in:
@@ -15,8 +15,10 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -48,11 +50,7 @@ public class LuceneServiceImpl implements LuceneService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> getTagName() {
|
public List<String> getTagName() {
|
||||||
List<String> res = new ArrayList<>();
|
return Arrays.stream(TagNameEnum.values()).map(TagNameEnum::getTag).collect(Collectors.toList());
|
||||||
for (TagNameEnum nameEnum : TagNameEnum.values()) {
|
|
||||||
res.add(nameEnum.getTag());
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
|||||||
Reference in New Issue
Block a user