feat: 新增多个服务类及工具类,重构部分代码结构
重构服务类结构,将分散的服务统一整合到service包下 新增ProjectConstant常量类及多个实体服务类 添加SecurityUtils安全工具类和BeanCacher工具类 优化部分UI控件和转换器的实现
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.ecep.contract.converter;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.ecep.contract.model.Company;
|
||||
import com.ecep.contract.service.CompanyService;
|
||||
|
||||
import jakarta.annotation.PostConstruct;
|
||||
|
||||
@Lazy
|
||||
@Component
|
||||
public class CompanyStringConverter extends EntityStringConverter<Company> {
|
||||
|
||||
@Lazy
|
||||
@Autowired
|
||||
CompanyService service;
|
||||
public CompanyStringConverter() {
|
||||
|
||||
}
|
||||
|
||||
@PostConstruct
|
||||
private void init() {
|
||||
setInitialized(project -> service.findById(project.getId()));
|
||||
setSuggestion(service::search);
|
||||
setFromString(service::findByName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user