本文整理了Java中org.nutz.ioc.loader.annotation.Inject
类的一些代码示例,展示了Inject
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Inject
类的具体详情如下:
包路径:org.nutz.ioc.loader.annotation.Inject
类名称:Inject
暂无
代码示例来源:origin: nutzam/nutz
iocField.setName(field.getName());
IocValue iocValue;
if (Strings.isBlank(inject.value())) {
if (field.getName().equals("ioc")) {
iocValue = new IocValue();
iocValue = Iocs.convert(inject.value(), true);
iocField.setValue(iocValue);
iocField.setOptional(inject.optional());
iocObject.addField(iocField);
fieldList.add(iocField.getName());
throw duplicateField(beanName, classZ, iocField.getName());
IocValue iocValue;
if (Strings.isBlank(inject.value())) {
iocValue = new IocValue();
iocValue.setType(IocValue.TYPE_REFER_TYPE);
iocValue.setValue(Strings.lowerFirst(methodName.substring(3)) + "#" + method.getParameterTypes()[0].getName());
} else
iocValue = Iocs.convert(inject.value(), true);
iocField.setValue(iocValue);
iocObject.addField(iocField);
代码示例来源:origin: nutzam/nutz
public ReferTypeValue(Field field) {
this.name = field.getName();
this.type = field.getType();
Inject inject = field.getAnnotation(Inject.class);
if (inject != null)
typeFirst = inject.typeFirst();
}
代码示例来源:origin: Rekoe/rk_svnadmin
public abstract class AbstractCrossOriginFilter implements ActionFilter {
@Inject
protected PropertiesProxy conf;
@Override
public View match(ActionContext ac) {
if (on()) {
HttpServletResponse response = ac.getResponse();
addHeader(response);
}
return null;
}
protected abstract boolean on();
protected abstract void addHeader(HttpServletResponse response);
}
代码示例来源:origin: Wizzercn/MqttWk
/**
* 消息转发,基于kafka
*/
@IocBean
public class InternalCommunication {
private static final Logger LOGGER = LoggerFactory.getLogger(InternalCommunication.class);
@Inject
private BrokerProperties brokerProperties;
@Inject
private KafkaService kafkaService;
@Inject
private RedisCluster redisCluster;
public void internalSend(InternalMessage internalMessage) {
String brokerId= Lang.JdkTool.getProcessId("0");
internalMessage.setBrokerId(brokerId);
//如果开启kafka消息转发
if (brokerProperties.getKafkaBrokerEnabled()) {
kafkaService.send(internalMessage);
}
//如果开启集群功能
if (brokerProperties.getClusterEnabled()) {
redisCluster.sendMessage(internalMessage);
}
}
}
代码示例来源:origin: nutzam/nutzboot
@Inject("refer:$ioc")
protected Ioc ioc;
@Inject
protected AppContext appContext;
代码示例来源:origin: org.nutz/nutz
iocField.setName(field.getName());
IocValue iocValue;
if (Strings.isBlank(inject.value())) {
if (field.getName().equals("ioc")) {
iocValue = new IocValue();
iocValue = Iocs.convert(inject.value(), true);
iocField.setValue(iocValue);
iocField.setOptional(inject.optional());
iocObject.addField(iocField);
fieldList.add(iocField.getName());
throw duplicateField(beanName, classZ, iocField.getName());
IocValue iocValue;
if (Strings.isBlank(inject.value())) {
iocValue = new IocValue();
iocValue.setType(IocValue.TYPE_REFER_TYPE);
iocValue.setValue(Strings.lowerFirst(methodName.substring(3)) + "#" + method.getParameterTypes()[0].getName());
} else
iocValue = Iocs.convert(inject.value(), true);
iocField.setValue(iocValue);
iocObject.addField(iocField);
代码示例来源:origin: org.nutz/nutz
public ReferTypeValue(Field field) {
this.name = field.getName();
this.type = field.getType();
Inject inject = field.getAnnotation(Inject.class);
if (inject != null)
typeFirst = inject.typeFirst();
}
代码示例来源:origin: Rekoe/rk_svnadmin
@Inject
private DefaultTreeFactory defaultTreeFactory;
@Inject
private RepTreeNodeService repTreeNodeService;
public String getHTML(Map<String, Object> parameters) {
代码示例来源:origin: nutzam/nutzboot
@Inject
protected PropertiesProxy conf;
代码示例来源:origin: nutzam/nutzboot
@IocBean
public class ZbusStarter implements ServerFace {
@Inject("refer:$ioc")
protected Ioc ioc;
@Inject
protected PropertiesProxy conf;
@Inject
protected AppContext appContext;
代码示例来源:origin: Wizzercn/MqttWk
/**
* Created by wizzer on 2018
*/
@IocBean
@Modules(packages = "cn.wizzer.iot")
public class MainLauncher {
private static final Log log = Logs.get();
@Inject("refer:$ioc")
private Ioc ioc;
@Inject
private PropertiesProxy conf;
@Inject
private RedisService redisService;
@Inject
private BrokerServer brokerServer;
public static void main(String[] args) throws Exception {
NbApp nb = new NbApp().setArgs(args).setPrintProcDoc(true);
nb.setMainPackage("cn.wizzer.iot");
nb.run();
}
}
代码示例来源:origin: nutzam/nutzboot
@IocBean
public class ActivitiSetupStarter implements ServerFace {
@Inject("refer:$ioc")
protected Ioc ioc;
public void start() throws Exception {
ioc.get(ProcessEngine.class);
}
}
代码示例来源:origin: nutzam/nutzboot
@IocBean
public class CloudConfigureChangeStarter implements ServerFace {
@Inject
protected AppContext appContext;
public void start() throws Exception {
appContext.getBeans(ConfigureEventHandler.class).forEach((listener)->CloudConfig.addListener(listener));
}
}
代码示例来源:origin: nutzam/nutzboot
@IocBean
public class DubboStarter implements ServerFace {
@Inject("refer:$ioc")
protected Ioc ioc;
@Override
public void start() throws Exception {
ioc.get(DubboManager.class);
}
}
代码示例来源:origin: org.nutz/nutzboot-starter-dubbo
@IocBean
public class DubboStarter implements ServerFace {
@Inject("refer:$ioc")
protected Ioc ioc;
@Override
public void start() throws Exception {
ioc.get(DubboManager.class);
}
}
代码示例来源:origin: nutzam/nutzboot
@Inject
protected PropertiesProxy conf;
@Inject
protected AppContext appContext;
@Inject("refer:$ioc")
protected Ioc ioc;
代码示例来源:origin: nutzam/nutzboot
private static final Log log = Logs.get();
private boolean keepRun = true;
@Inject
private LoglevelProperty loglevelProperty;
@Inject
private LoglevelService loglevelService;
代码示例来源:origin: nutzam/nutzboot
@IocBean
public class ShiroFilterStarter implements WebFilterFace {
@Inject("refer:$ioc")
protected Ioc ioc;
@Inject
protected PropertiesProxy conf;
代码示例来源:origin: nutzam/nutzboot
@IocBean(name="$views_jetx")
public class JetxViewMakerStarter implements ViewMaker {
@Inject
protected PropertiesProxy conf;
@Inject
protected AppContext appContext;
代码示例来源:origin: Wizzercn/MqttWk
@IocBean
public class DupPublishMessageStoreService implements IDupPublishMessageStoreService {
@Inject
private IMessageIdService messageIdService;
@Inject
private DupPublishMessageCache dupPublishMessageCache;
内容来源于网络,如有侵权,请联系作者删除!