NutzCN Logo
问答 ajax带参数 control方法进不去
发布于 2673天前 作者 qq_e79520c3 1842 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

function modifySer(key){
$.ajax({
async: false,
url: "http://localhost:8080/beyond3dmapplatform/zswopr/monitor/modifySetting?"+key+"="+$("#"+key).val(),
dataType: "json",
success: function (data) {
if(data.success){
alert("更新成功!");
}else{
alert("更新失败!");
}
}
});
}

@At("/modifySetting")
@Ok("json:full")
@RequiresAuthentication
public Object modifySetting(@Param("..") Sys_status Sysstatus) throws Exception {
    Map<String,String> result = new HashMap<String,String>();

// String message = "保存成功";
// String code ="1";
// result.put("success", message);
// result.put("code", code);
// try {
// sysAlarmService.insert(monitor);
// } catch (Exception e) {
// e.printStackTrace();
// message = "保存失败";
// code = "-1";
// result.put("success", message);
// result.put("code", code);
//
// }
return result;
}

[DEBUG] 2017-08-28 18:19:55,425 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:84) - Remove object 'zswoprMoinitorController' from [app] [DEBUG] 2017-08-28 18:19:55,425 cn.wizzer.app.web.commons.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) - [GET ]URI=/beyond3dmap/platform/zswopr/monitor 44ms
[WARN ] 2017-08-28 18:19:55,425 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/platform/zswopr/monitor :
org.nutz.ioc.IocException: IocBean[zswoprMoinitorController] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)

11 回复

用 “插入代码”按钮再发一次

function modifySer(key){
 $.ajax({
 async: false,
 url: "http://localhost:8080/beyond3dmapplatform/zswopr/monitor/modifySetting?"+key+"="+$("#"+key).val(),
 dataType: "json",
 success: function (data) {
 if(data.success){
 alert("更新成功!");
 }else{
 alert("更新失败!");
 }
 }
 });
 }

@At("/modifySetting")
@Ok("json:full")
@RequiresAuthentication
public Object modifySetting(@Param("..") Sys_status Sysstatus) throws Exception {
    Map<String,String> result = new HashMap<String,String>();
// String message = "保存成功";
// String code ="1";
// result.put("success", message);
// result.put("code", code);
// try {
// sysAlarmService.insert(monitor);
// } catch (Exception e) {
// e.printStackTrace();
// message = "保存失败";
// code = "-1";
// result.put("success", message);
// result.put("code", code);
//
// }
 return result;
 }

[DEBUG] 2017-08-28 18:19:55,425 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:84) - Remove object 'zswoprMoinitorController' from [app] 
[DEBUG] 2017-08-28 18:19:55,425 cn.wizzer.app.web.commons.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) - [GET ]URI=/beyond3dmap/platform/zswopr/monitor 44ms
[WARN ] 2017-08-28 18:19:55,425 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/platform/zswopr/monitor :
org.nutz.ioc.IocException: IocBean[zswoprMoinitorController] throw Exception when creating
 at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
 at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
 at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
 at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
 at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)

贴完整报错信息

加载别的报的错吧 好像不是这个方法的问题

[DEBUG] 2017-08-28 18:38:32,889 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) - Found IocObject($aop_wkcache) in AnnotationIocLoader(packages=[org.nutz.plugins.wkcache])
[DEBUG] 2017-08-28 18:38:32,890 org.nutz.ioc.loader.combo.ComboIocLoader.load(ComboIocLoader.java:161) - Found IocObject(wkcacheRemoveEntryInterceptor) in AnnotationIocLoader(packages=[org.nutz.plugins.wkcache])
[DEBUG] 2017-08-28 18:38:32,890 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:84) - Remove object 'zswoprMoinitorController' from [app] 
[DEBUG] 2017-08-28 18:38:32,890 cn.wizzer.app.web.commons.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) - [GET ]URI=/beyond3dmap/platform/zswopr/monitor 62ms
[WARN ] 2017-08-28 18:38:32,890 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/platform/zswopr/monitor :
org.nutz.ioc.IocException: IocBean[zswoprMoinitorController] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at cn.wizzer.app.web.commons.processor.GlobalsSettingProcessor.process(GlobalsSettingProcessor.java:36)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at cn.wizzer.app.web.commons.processor.LogTimeProcessor.process(LogTimeProcessor.java:21)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at cn.wizzer.app.web.commons.filter.RouteFilter.doFilter(RouteFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1132)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: IocBean[zswoprMoinitorController] fail at field=[sysAlarmService]
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:135)
	... 50 more
Caused by: org.nutz.ioc.IocException: IocBean[class:cn.wizzer.app.sys.modules.services.SysAlarmService] none ioc bean match class=cn.wizzer.app.sys.modules.services.SysAlarmService
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:399)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:66)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	... 52 more
[WARN ] 2017-08-28 18:38:43,273 org.quartz.impl.jdbcjobstore.JobStoreSupport.findFailedInstances(JobStoreSupport.java:3350) - This scheduler instance (LAPTOP-BJQLQBJV1503916522940) is still active but was recovered by another instance in the cluster.  This may cause inconsistent behavior.
[DEBUG] 2017-08-28 18:38:43,295 org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:107) - Lock 'STATE_ACCESS' is desired by: QuartzScheduler_defaultScheduler-LAPTOP-BJQLQBJV1503916522940_ClusterManager
[DEBUG] 2017-08-28 18:38:43,295 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:92) - Lock 'STATE_ACCESS' is being obtained: QuartzScheduler_defaultScheduler-LAPTOP-BJQLQBJV1503916522940_ClusterManager
[DEBUG] 2017-08-28 18:38:43,300 org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:116) - Lock 'STATE_ACCESS' given to: QuartzScheduler_defaultScheduler-LAPTOP-BJQLQBJV1503916522940_ClusterManager
[DEBUG] 2017-08-28 18:38:43,305 org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:107) - Lock 'TRIGGER_ACCESS' is desired by: QuartzScheduler_defaultScheduler-LAPTOP-BJQLQBJV1503916522940_ClusterManager
[DEBUG] 2017-08-28 18:38:43,306 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:92) - Lock 'TRIGGER_ACCESS' is being obtained: QuartzScheduler_defaultScheduler-LAPTOP-BJQLQBJV1503916522940_ClusterManager
[DEBUG] 2017-08-28 18:38:43,312 org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:116) - Lock 'TRIGGER_ACCESS' given to: QuartzScheduler_defaultScheduler-LAPTOP-BJQLQBJV1503916522940_ClusterManager
[INFO ] 2017-08-28 18:38:43,312 org.quartz.impl.jdbcjobstore.JobStoreSupport.logWarnIfNonZero(JobStoreSupport.java:3583) - ClusterManager: detected 1 failed or restarted instances.
[INFO ] 2017-08-28 18:38:43,312 org.quartz.impl.jdbcjobstore.JobStoreSupport.clusterRecover(JobStoreSupport.java:3442) - ClusterManager: Scanning for instance "LAPTOP-C2HSQM2K1503899086351"'s failed in-progress jobs.
[DEBUG] 2017-08-28 18:38:43,326 org.quartz.impl.jdbcjobstore.JobStoreSupport.logWarnIfNonZero(JobStoreSupport.java:3585) - ClusterManager: ......Freed 0 acquired trigger(s).
[DEBUG] 2017-08-28 18:38:43,326 org.quartz.impl.jdbcjobstore.JobStoreSupport.logWarnIfNonZero(JobStoreSupport.java:3585) - ClusterManager: ......Deleted 0 complete triggers(s).
[DEBUG] 2017-08-28 18:38:43,326 org.quartz.impl.jdbcjobstore.JobStoreSupport.logWarnIfNonZero(JobStoreSupport.java:3585) - ClusterManager: ......Scheduled 0 recoverable job(s) for recovery.
[DEBUG] 2017-08-28 18:38:43,326 org.quartz.impl.jdbcjobstore.JobStoreSupport.logWarnIfNonZero(JobStoreSupport.java:3585) - ClusterManager: ......Cleaned-up 0 other failed job(s).
[DEBUG] 2017-08-28 18:38:43,338 org.quartz.impl.jdbcjobstore.DBSemaphore.releaseLock(DBSemaphore.java:141) - Lock 'TRIGGER_ACCESS' returned by: QuartzScheduler_defaultScheduler-LAPTOP-BJQLQBJV1503916522940_ClusterManager
[DEBUG] 2017-08-28 18:38:43,338 org.quartz.impl.jdbcjobstore.DBSemaphore.releaseLock(DBSemaphore.java:141) - Lock 'STATE_ACCESS' returned by: QuartzScheduler_defaultScheduler-LAPTOP-BJQLQBJV1503916522940_ClusterManager
[DEBUG] 2017-08-28 18:38:43,338 org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3877) - ClusterManager: Check-in complete.

给这个属性赋值的时候出的问题
sysAlarmService

是这个control,

SysAlarmService 这个类没些@IocBean

SysAlarmService的实现类忘记实现SysAlarmService了? 或者忘记写@IocBean了?

说的很清楚

Caused by: org.nutz.ioc.IocException: IocBean[class:cn.wizzer.app.sys.modules.services.SysAlarmService] none ioc bean match class=cn.wizzer.app.sys.modules.services.SysAlarmService

恩恩,好的,我认真看看,谢谢了

添加回复
请先登陆
回到顶部