求大神帮我com.google.gson.stream.MalformedJsonException

我别的界面用的解析方法都是一样的,别的界面的数据就是能解析出来,但是这个界面总是出现图片说明图片说明这个问题,但是那个JSON的格式又没有错,这问题已经卡了好几天了,望大神帮我解决一下,万分感谢

2个回答

应该是json不规范导致的

qq_35399450
qq_35399450 回复Ashaic怎么解决的 求解
大约 2 年之前 回复
doubleccccccccccccc
Ashaics 已经解决了!谢谢
3 年多之前 回复

你要解析的,字段名或者值,不规范,有中文或者有空格

doubleccccccccccccc
Ashaics 没有中文名那些的,我放到JSON格式化工具上,都可以格式化出来
3 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
arcgis-android:100.0.0依赖gson.2.3.1.jar失败,是什么原因呢?
很无语的一个问题。 依赖'com.esri.arcgisruntime:arcgis-android:100.0.0'同步时报出“Error:Failed to resolve: com.google.code.gson:gson:2.3.1”。 clean project之后又报出: Error:A problem occurred configuring project ':app'.> Could not resolve all dependencies for configuration ':app:_debugApkCopy'. > Could not resolve com.google.code.gson:gson:2.3.1. Required by: project :app > com.esri.arcgisruntime:arcgis-android:100.0.0 > Could not resolve com.google.code.gson:gson:2.3.1. > Could not get resource 'https://jcenter.bintray.com/com/google/code/gson/gson/2.3.1/gson-2.3.1.pom'. > Could not HEAD 'https://jcenter.bintray.com/com/google/code/gson/gson/2.3.1/gson-2.3.1.pom'. > Server sent an unsupported extension: type_35 很尴尬啊,找了很久不知道什么问题。 在线依赖“com.esri.arcgisruntime:arcgis-android:100.0.0”,更可怕直接卡在下download arcgis-android-100.0.0.aar上面。(一直开着VPN) 按照官网文档和网上大神的经验配置离线: 1、本地配置maven,并将arcgis-android-100.0.0.aar和arcgis-android-100.0.0.pom放入在C:\Users\Administrator\.m2\repository\com\esri\arcgis\android\arcgis-android\100.0.0和C:\Users\Administrator\.m2\repository\com\esri\arcgisruntime\arcgis-android\100.0.0(因为不知道哪个对,索性就配置了两个)。 2、so文件放在了src/main/jinLibs文件夹下,并在build.gradle配置了。 3、arcgis-android-api.jar和gson-2.3.1.jar放在libs下并依赖。 4、project下的build.gradle也配置了本地仓库。 ![![图片说明](https://img-ask.csdn.net/upload/201706/04/1496572186_730793.png)图片说明](https://img-ask.csdn.net/upload/201706/04/1496572169_652169.png)
ClassNotFoundException: com.google.gson.Gson
Servlet.service() for servlet [ns] in context with path [/EC] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/google/gson/Gson] with root cause java.lang.ClassNotFoundException: com.google.gson.Gson at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) at com.ns.controllers.impl.systemDevice.SystemManageImpl.SendDeviceControlOrder(SystemManageImpl.java:307) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827) at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
:Expected BEGIN_ARRAY求大神们
12-03 01:40:58.903 3439-3456/? E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher Process: com.h954gmail.y.cnch, PID: 3439 com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $ at com.google.gson.Gson.fromJson(Gson.java:899) at com.google.gson.Gson.fromJson(Gson.java:852) at com.google.gson.Gson.fromJson(Gson.java:801) at com.h954gmail.y.cnch.fragment.HomeFragment$1.onResponse(HomeFragment.java:88) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $ at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:350) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:80) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61) at com.google.gson.Gson.fromJson(Gson.java:887) at com.google.gson.Gson.fromJson(Gson.java:852)  at com.google.gson.Gson.fromJson(Gson.java:801)  at com.h954gmail.y.cnch.fragment.HomeFragment$1.onResponse(HomeFragment.java:88)  at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126)  at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)  at java.lang.Thread.run(Thread.java:818)  求解!!
求大神!! SpringbootAdmin2.1.4 解析gson类型的json出错
springboot2.1.4版本. 默认使用json转换器gson(spring.http.converters.preferred-json-mapper=gson), 使用springbootAdmin监控时, beans会报错Forgot to register a type adapter? ![图片说明](https://img-ask.csdn.net/upload/201904/22/1555921545_198734.png) 问题:springbootAdmin使用默认的jackson没问题,怎么能兼容gson?
com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 232?
GSON解析json格式字符串,利用GSON的fromJson函数,将Json字符串解析为java对象,spark本地模式可以执行,但是在集群上yarn模式一直出现以下错误: com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 232
gson将json格式的字符串转成java对象,json字符串中long怎么转变不会报错?
# gson将json格式的字符串转成java对象,json字符串中long怎么转变不会报错? public static void main(String[] args) { long timel=12323232L; SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String time=sdf.format(timel); System.out.println(time);//正常 Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create(); String obj="[{\"name\":\"caochuankui\",\"time\":"+timel+"}]"; JSONArray objo=new JSONArray(obj); GsonTest gt=gson.fromJson(objo.toString(), GsonTest.class);//报错 System.out.println(gt.getTime()); } } 错误信息如下: 1970-01-01 11:25:23 Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $ at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:200) at com.google.gson.Gson.fromJson(Gson.java:810) at com.google.gson.Gson.fromJson(Gson.java:775) at com.google.gson.Gson.fromJson(Gson.java:724) at com.google.gson.Gson.fromJson(Gson.java:696) at com.pagecofig.util.GsonTest.main(GsonTest.java:67) Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 2 path $ at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:387) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:189) ... 5 more 这要怎么解决,求大神指点
解析包含null的原始json数组
Json数组: {"userName":null," msgArr":[null],"numrow":0} //String result Gson: new Gson().fromJson(result, MyClass.class); MyClass: public String userName; public int[] msgArr; ... 错误stack: at java.lang.IllegalArgumentException: Primitive array can't take null values. at java.lang.reflect.Array.set(Array.java:406) at com.google.gson.internal.bind.ArrayTypeAdapter.read(ArrayTypeAdapter.java:78) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.Gson.fromJson(Gson.java:803) at com.google.gson.Gson.fromJson(Gson.java:768) at com.google.gson.Gson.fromJson(Gson.java:717) at com.google.gson.Gson.fromJson(Gson.java:689) at com.test.dao.RequestBase.onPostExecute(RequestBase.java:79) 如果不能修改json字符串 "msgArr=[null]",怎么解除这个异常?
JAVA如何获取本地.json文件并遍历
因为开发的原因,后期要测试,就在网上抓取了一些商品数据,并组成了json文件.然而我在从本地读取并遍历的时候,遇到了点问题.无法直接遍历,报错Exception in thread "main" com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2 path $ at com.google.gson.JsonParser.parse(JsonParser.java:65) at com.google.gson.JsonParser.parse(JsonParser.java:45) at com.enation.framework.util.JsonUtil.parseJsonArray(JsonUtil.java:103) at com.enation.framework.util.JsonUtil.toList(JsonUtil.java:43) at com.enation.app.b2b2c.front.api.goods.InsertGoods.main(InsertGoods.java:136) Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2 path $ at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1574) at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1423) at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:546) at com.google.gson.stream.JsonReader.peek(JsonReader.java:429) at com.google.gson.JsonParser.parse(JsonParser.java:60) ... 4 more ``` ```因为json文件中有特别多的数据,哪位大神有好点的方法,特别是有代码的话更好,万分感谢!
android项目报gson jar包could not expand ZIP
android项目报错: Execution failed for task ':app:compileDebugJavaWithJavac'. > Could not expand ZIP 'C:\Users\admin\.gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.8.6\9180733b7df8542621dc12e21e87557e8c99b8cb\gson-2.8.6.jar'. 启动都就报这个错,但是我项目中并没有用到gson,android小白上手就遇到这个,希望有大神帮忙解决,感谢感谢~
com.google.gson.JsonSyntaxException
我使用的是谷歌提供的gson解析json数据。json数据如下" {"flag":"0","data":{"id":"176","loginName":"18224006722","name":"18224006722","phone":"18224006722","mobile":"18224006722","loginToken":"c4b23c48bcc7a9bf4f4301cfeca4c3d2","isStoreAdm":"1","storeLogo":""},"tcount":0} ";网络方面我使用的是 OkHttpUtils。 使用自定义的 StringCallback() public abstract class LoginCall extends Callback<Login>{ @Override public Login parseNetworkResponse(Response response) throws Exception { String result = response.body().string(); Gson gson=new Gson(); return gson.fromJson(result,Login.class); } } java实体类我使用的是GsonFormat自动生成的而且还序列化了的,结果就是要报这个异常,求解答。 哦哦,我不使用gson解析可以获取到json字符串, java实体类: public class Login implements Serializable{ private String flag; private DataBean data; private int tcount; public String getFlag() { return flag; } public void setFlag(String flag) { this.flag = flag; } public DataBean getData() { return data; } public void setData(DataBean data) { this.data = data; } public int getTcount() { return tcount; } public void setTcount(int tcount) { this.tcount = tcount; } public static class DataBean implements Serializable{ private String id; private String loginName; private String name; private String phone; private String mobile; private String loginToken; private String isStoreAdm; private String storeLogo; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getLoginName() { return loginName; } public void setLoginName(String loginName) { this.loginName = loginName; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getLoginToken() { return loginToken; } public void setLoginToken(String loginToken) { this.loginToken = loginToken; } public String getIsStoreAdm() { return isStoreAdm; } public void setIsStoreAdm(String isStoreAdm) { this.isStoreAdm = isStoreAdm; } public String getStoreLogo() { return storeLogo; } public void setStoreLogo(String storeLogo) { this.storeLogo = storeLogo; } } 求帮助呀,谢谢大神了。
Expected a BEGIN_ARRAY but was STRING at line
android访问本机后台没问题。能够返回正常的数据,但是我把本机后台项目打包成war包放在 服务器上,然后用android去访问服务器,就会报如下错误: ``` Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $ at com.google.gson.Gson.fromJson(Gson.java:899) at com.google.gson.Gson.fromJson(Gson.java:852) at com.google.gson.Gson.fromJson(Gson.java:801) at com.example.ldp.com.activity.StudentActivity.initFruits(StudentActivity.java:107) at com.example.ldp.com.activity.StudentActivity.onCreate(StudentActivity.java:51) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) ``` 访问代码: ``` private void initFruits(){ Map<String,String> map = new HashMap<>(); map.put("username",username); String str = HttpGetUtil.SendPostHttp("showcourse/toshowcourse.action",map); Log.i("LDP",str); Gson gson = new Gson(); coursesList = gson.fromJson(str,new TypeToken<List<Course>>(){}.getType()); if(coursesList.size()==0){ Toast.makeText(StudentActivity.this,"cuowu",Toast.LENGTH_SHORT).show(); } } ``` 后台返回的json数据格式: ![图片说明](https://img-ask.csdn.net/upload/201705/08/1494226654_710863.png)
坐等求救,java用ssh的时候,Gson解析json有外键的时候报错
java.lang.UnsupportedOperationException: Attempted to serialize java.lang.Class: org.hibernate.proxy.HibernateProxy. Forgot to register a type adapter? com.google.gson.internal.bind.TypeAdapters$1.write(TypeAdapters.java:73) com.google.gson.internal.bind.TypeAdapters$1.write(TypeAdapters.java:69) com.google.gson.TypeAdapter$1.write(TypeAdapter.java:191) com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) com.google.gson.internal.bind.ArrayTypeAdapter.write(ArrayTypeAdapter.java:95) com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:125) com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:243) com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:125) com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:243) com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:125) com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:243) com.google.gson.internal.bind.ObjectTypeAdapter.write(ObjectTypeAdapter.java:107) com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:97) com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:61) com.google.gson.Gson.toJson(Gson.java:669) com.google.gson.Gson.toJson(Gson.java:648) com.google.gson.Gson.toJson(Gson.java:603) com.google.gson.Gson.toJson(Gson.java:583) com.gx.lyf.other.controls.NoticeAction.text(NoticeAction.java:96) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452) com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248) org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52) org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485) org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77) org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
tomcat经常挂掉,过程如下
八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol pause 信息: Pausing ProtocolHandler ["http-apr-9996"] 八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol pause 信息: Pausing ProtocolHandler ["ajp-apr-8021"] 八月 18, 2016 10:59:13 上午 org.apache.catalina.core.StandardService stopInternal 信息: Stopping service Catalina 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc 严重: The web application [/] registered the JDBC driver [com.mysql.fabric.jdbc.FabricMySQLDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc 严重: The web application [/] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: The web application [/] appears to have started a thread named [FileWatchdog] but has failed to stop it. This is very likely to create a memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: The web application [/] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@76776dce]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@1aca2c25]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@4f183ee0]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@40c80cb1]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@db959b1]) and a value of type [com.yunze.bcpt.service.pay.weixinpay.common.Configure.Account] (value [OA]) but failed to remove it when the web app lication was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. "/home/tomcat/bcpt/weixin/logs/catalina.out" 710295L, 232929613C 710150,1 99% 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@4f5ea590]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@4b3e241a]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@76776dce]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@40c80cb1]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@3af7a81]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@4ec7b9a5]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@4f183ee0]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 严重: The web application [/] created a ThreadLocal with key of type [com.google.gson.Gson$1] (value [com.google.gson.Gson$1@4ec7b9a5]) and a value of type [java.util.HashMap] (value [{}]) but failed to remove it when the web application was stopped. Threads are going t o be renewed over time to try and avoid a probable memory leak. 八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol stop 信息: Stopping ProtocolHandler ["http-apr-9996"] 八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol stop 信息: Stopping ProtocolHandler ["ajp-apr-8021"] 八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol destroy 信息: Destroying ProtocolHandler ["http-apr-9996"] 八月 18, 2016 10:59:13 上午 org.apache.coyote.AbstractProtocol destroy 信息: Destroying ProtocolHandler ["ajp-apr-8021"] 这个是catlina.out在程序每次挂掉前的输出,没有其他的错误日志 export JAVA_OPTS="-server -Xms650m -Xmx650m -Xmn260m -XX:PermSize=256m -XX:MaxPermSize=256m -Xss256K -XX:+DisableExplicitGC -XX:SurvivorRatio=2 -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:CMSFullGCsBeforeCompaction=1 -XX: +CMSClassUnloadingEnabled -XX:LargePageSizeInBytes=128M -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Djava.awt.headless=true -XX:+PrintClassHistogram -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC - Xloggc:/var/log/gc.log -XX:ErrorFile=/var/log/hs_err_pid.log" 多次调试还是会挂,这是目前的JVM参数,同时还运行了另一个tomcat实例,但那一个就不会挂,感谢各位大神指点
用ssm框架做的项目,用浏览器登录后点击目录,点一次没有错,点第二次就报错。
求教大神帮忙看看,感激不尽!!!! 严重: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request processing failed; nested exception is com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: empty String] with root cause java.lang.NumberFormatException: empty String at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at sun.misc.FloatingDecimal.parseDouble(Unknown Source) at java.lang.Double.parseDouble(Unknown Source) at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1201) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:225) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:217) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220) at com.google.gson.Gson.fromJson(Gson.java:887) at com.google.gson.Gson.fromJson(Gson.java:852) at com.google.gson.Gson.fromJson(Gson.java:801) at com.google.gson.Gson.fromJson(Gson.java:773) at com.edu.controller.SyllabusController.queryList(SyllabusController.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2549) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2538) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
在网络请求的时候出现以下报错
遇到了这么个问题,用的Retrofit+rxjava+Okhttp,求解答 ``` Process: com.example.tidus.ristrat, PID: 7166 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tidus.ristrat/com.example.tidus.ristrat.activity.RiskAssessmentActivity}: java.lang.IllegalArgumentException: Unable to create converter for class com.example.tidus.ristrat.bean.RiskAssessmentBean for method IRetrofitServer.doRiskTableListGet at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3260) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3396) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2009) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7319) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934) Caused by: java.lang.IllegalArgumentException: Unable to create converter for class com.example.tidus.ristrat.bean.RiskAssessmentBean for method IRetrofitServer.doRiskTableListGet at retrofit2.ServiceMethod$Builder.methodError(ServiceMethod.java:755) at retrofit2.ServiceMethod$Builder.createResponseConverter(ServiceMethod.java:741) at retrofit2.ServiceMethod$Builder.build(ServiceMethod.java:172) at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:170) at retrofit2.Retrofit$1.invoke(Retrofit.java:147) at java.lang.reflect.Proxy.invoke(Proxy.java:1006) at $Proxy3.doRiskTableListGet(Unknown Source) at com.example.tidus.ristrat.mvp.model.RiskAssessmentModel.getRiskAssessment(RiskAssessmentModel.java:25) at com.example.tidus.ristrat.mvp.presenter.RiskAssessmentPresenter.getRiskAssessment(RiskAssessmentPresenter.java:16) at com.example.tidus.ristrat.activity.RiskAssessmentActivity.initPresenterData(RiskAssessmentActivity.java:183) at com.example.tidus.ristrat.activity.RiskAssessmentActivity.initData(RiskAssessmentActivity.java:158) at com.example.lib_core.base.BaseActivity.onCreate(BaseActivity.java:44) at android.app.Activity.performCreate(Activity.java:7783) at android.app.Activity.performCreate(Activity.java:7772) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3235) ... 11 more Caused by: java.lang.SecurityException: Can not make a java.lang.reflect.Method constructor accessible at java.lang.reflect.AccessibleObject.setAccessible0(AccessibleObject.java:153) at java.lang.reflect.AccessibleObject.setAccessible(AccessibleObject.java:132) at com.google.gson.internal.reflect.PreJava9ReflectionAccessor.makeAccessible(PreJava9ReflectionAccessor.java:31) at com.google.gson.internal.ConstructorConstructor.newDefaultConstructor(ConstructorConstructor.java:103) at com.google.gson.internal.ConstructorConstructor.get(ConstructorConstructor.java:85) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:101) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ArrayTypeAdapter$1.create(ArrayTypeAdapter.java:48) at com.google.gson.Gson.getAdapter(Gson.java:458) 2019-09-04 13:57:04.536 7166-7166/com.example.tidus.ristrat E/AndroidRuntime: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117) 2019-09-04 13:57:04.537 7166-7166/com.example.tidus.ristrat E/AndroidRuntime: at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102) at com.google.gson.Gson.getAdapter(Gson.java:458) at retrofit2.converter.gson.GsonConverterFactory.responseBodyConverter(GsonConverterFactory.java:64) at retrofit2.Retrofit.nextResponseBodyConverter(Retrofit.java:330) at retrofit2.Retrofit.responseBodyConverter(Retrofit.java:313) at retrofit2.ServiceMethod$Builder.createResponseConverter(ServiceMethod.java:739) ... 25 more ``` Bean类 ``` package com.example.tidus.ristrat.bean; import android.view.View; import java.io.Serializable; import java.util.List; public class RiskAssessmentBean implements Serializable { private String code; private String message; private String server_code; private ServerParamsBean server_params; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getServer_code() { return server_code; } public void setServer_code(String server_code) { this.server_code = server_code; } public ServerParamsBean getServer_params() { return server_params; } public void setServer_params(ServerParamsBean server_params) { this.server_params = server_params; } public static class ServerParamsBean implements Serializable { private String PATIENT_ID; private Object DOCTOR_NAME; private Object REPORT_CODE; private Object REPORT_ID; private String IN_DEPT_CODE; private String IN_DEPT_NAME; private String PATIENT_NAME; private String BIRTHDAY; private String PATIENT_SEX; private String MEDICAL_REC_NUMBER; private String VISIT_SQ_NO; private String BED_NUMBER; private List<WENJUANNAMEBean> WENJUANNAME; public String getPATIENT_ID() { return PATIENT_ID; } public void setPATIENT_ID(String PATIENT_ID) { this.PATIENT_ID = PATIENT_ID; } public Object getDOCTOR_NAME() { return DOCTOR_NAME; } public void setDOCTOR_NAME(Object DOCTOR_NAME) { this.DOCTOR_NAME = DOCTOR_NAME; } public Object getREPORT_CODE() { return REPORT_CODE; } public void setREPORT_CODE(Object REPORT_CODE) { this.REPORT_CODE = REPORT_CODE; } public Object getREPORT_ID() { return REPORT_ID; } public void setREPORT_ID(Object REPORT_ID) { this.REPORT_ID = REPORT_ID; } public String getIN_DEPT_CODE() { return IN_DEPT_CODE; } public void setIN_DEPT_CODE(String IN_DEPT_CODE) { this.IN_DEPT_CODE = IN_DEPT_CODE; } public String getIN_DEPT_NAME() { return IN_DEPT_NAME; } public void setIN_DEPT_NAME(String IN_DEPT_NAME) { this.IN_DEPT_NAME = IN_DEPT_NAME; } public String getPATIENT_NAME() { return PATIENT_NAME; } public void setPATIENT_NAME(String PATIENT_NAME) { this.PATIENT_NAME = PATIENT_NAME; } public String getBIRTHDAY() { return BIRTHDAY; } public void setBIRTHDAY(String BIRTHDAY) { this.BIRTHDAY = BIRTHDAY; } public String getPATIENT_SEX() { return PATIENT_SEX; } public void setPATIENT_SEX(String PATIENT_SEX) { this.PATIENT_SEX = PATIENT_SEX; } public String getMEDICAL_REC_NUMBER() { return MEDICAL_REC_NUMBER; } public void setMEDICAL_REC_NUMBER(String MEDICAL_REC_NUMBER) { this.MEDICAL_REC_NUMBER = MEDICAL_REC_NUMBER; } public String getVISIT_SQ_NO() { return VISIT_SQ_NO; } public void setVISIT_SQ_NO(String VISIT_SQ_NO) { this.VISIT_SQ_NO = VISIT_SQ_NO; } public String getBED_NUMBER() { return BED_NUMBER; } public void setBED_NUMBER(String BED_NUMBER) { this.BED_NUMBER = BED_NUMBER; } public List<WENJUANNAMEBean> getWENJUANNAME() { return WENJUANNAME; } public void setWENJUANNAME(List<WENJUANNAMEBean> WENJUANNAME) { this.WENJUANNAME = WENJUANNAME; } public static class WENJUANNAMEBean implements Serializable { private int MERCHANT_ID; private int SITE_ID; private int DEPARTMENT; private int FORM_ID; private String FORM_NAME; private int FORM_TYPE; private int FORM_SEQ; private String BUSINESS_CLASS; private List<XUANXIANGBean> XUANXIANG; private boolean che_color; private int form_id; public int getForm_id() { return form_id; } public void setForm_id(int form_id) { this.form_id = form_id; } public boolean isChe_color() { return che_color; } public void setChe_color(boolean che_color) { this.che_color = che_color; } public int getMERCHANT_ID() { return MERCHANT_ID; } public void setMERCHANT_ID(int MERCHANT_ID) { this.MERCHANT_ID = MERCHANT_ID; } public int getSITE_ID() { return SITE_ID; } public void setSITE_ID(int SITE_ID) { this.SITE_ID = SITE_ID; } public int getDEPARTMENT() { return DEPARTMENT; } public void setDEPARTMENT(int DEPARTMENT) { this.DEPARTMENT = DEPARTMENT; } public int getFORM_ID() { return FORM_ID; } public void setFORM_ID(int FORM_ID) { this.FORM_ID = FORM_ID; } public String getFORM_NAME() { return FORM_NAME; } public void setFORM_NAME(String FORM_NAME) { this.FORM_NAME = FORM_NAME; } public int getFORM_TYPE() { return FORM_TYPE; } public void setFORM_TYPE(int FORM_TYPE) { this.FORM_TYPE = FORM_TYPE; } public int getFORM_SEQ() { return FORM_SEQ; } public void setFORM_SEQ(int FORM_SEQ) { this.FORM_SEQ = FORM_SEQ; } public String getBUSINESS_CLASS() { return BUSINESS_CLASS; } public void setBUSINESS_CLASS(String BUSINESS_CLASS) { this.BUSINESS_CLASS = BUSINESS_CLASS; } public List<XUANXIANGBean> getXUANXIANG() { return XUANXIANG; } public void setXUANXIANG(List<XUANXIANGBean> XUANXIANG) { this.XUANXIANG = XUANXIANG; } public static class XUANXIANGBean implements Serializable { private String GROUP_TAB; private int GROUP_TAB_ID; private List<WENJUANBean> WENJUAN; public String getGROUP_TAB() { return GROUP_TAB; } public void setGROUP_TAB(String GROUP_TAB) { this.GROUP_TAB = GROUP_TAB; } public int getGROUP_TAB_ID() { return GROUP_TAB_ID; } public void setGROUP_TAB_ID(int GROUP_TAB_ID) { this.GROUP_TAB_ID = GROUP_TAB_ID; } public List<WENJUANBean> getWENJUAN() { return WENJUAN; } public void setWENJUAN(List<WENJUANBean> WENJUAN) { this.WENJUAN = WENJUAN; } public static class WENJUANBean implements Serializable { private int FACTOR_GROUP_SEQ; private String FACTOR_GROUP_ID; private String FACTOR_GROUP_NAME; private List<SublistBean> sublist; public int getFACTOR_GROUP_SEQ() { return FACTOR_GROUP_SEQ; } public void setFACTOR_GROUP_SEQ(int FACTOR_GROUP_SEQ) { this.FACTOR_GROUP_SEQ = FACTOR_GROUP_SEQ; } public String getFACTOR_GROUP_ID() { return FACTOR_GROUP_ID; } public void setFACTOR_GROUP_ID(String FACTOR_GROUP_ID) { this.FACTOR_GROUP_ID = FACTOR_GROUP_ID; } public String getFACTOR_GROUP_NAME() { return FACTOR_GROUP_NAME; } public void setFACTOR_GROUP_NAME(String FACTOR_GROUP_NAME) { this.FACTOR_GROUP_NAME = FACTOR_GROUP_NAME; } public List<SublistBean> getSublist() { return sublist; } public void setSublist(List<SublistBean> sublist) { this.sublist = sublist; } public static class SublistBean implements Serializable { private int FACTOR_GROUP_ID; private String FACTOR_GROUP_NAME; private String FACTOR_GROUP_DESC; private int FACTOR_GROUP_SEQ; private Object GROUP_SHOW_LAYOUT; private int RISK_FACTOR_ID; private String RISK_FACTOR_NAME; private int SCORE_SHOW_TYPE; private int MUTEX_GROUP; private String isslect; private String ANALYSIS_SOURCE_STR; private String CURRENT_DESC; private List<OptionListBean> optionList; private View shuruValue; private boolean checked; public boolean isChecked() { return checked; } public void setChecked(boolean checked) { this.checked = checked; } public View getShuruValue() { return shuruValue; } public void setShuruValue(View shuruValue) { this.shuruValue = shuruValue; } public int getFACTOR_GROUP_ID() { return FACTOR_GROUP_ID; } public void setFACTOR_GROUP_ID(int FACTOR_GROUP_ID) { this.FACTOR_GROUP_ID = FACTOR_GROUP_ID; } public String getFACTOR_GROUP_NAME() { return FACTOR_GROUP_NAME; } public void setFACTOR_GROUP_NAME(String FACTOR_GROUP_NAME) { this.FACTOR_GROUP_NAME = FACTOR_GROUP_NAME; } public String getFACTOR_GROUP_DESC() { return FACTOR_GROUP_DESC; } public void setFACTOR_GROUP_DESC(String FACTOR_GROUP_DESC) { this.FACTOR_GROUP_DESC = FACTOR_GROUP_DESC; } public int getFACTOR_GROUP_SEQ() { return FACTOR_GROUP_SEQ; } public void setFACTOR_GROUP_SEQ(int FACTOR_GROUP_SEQ) { this.FACTOR_GROUP_SEQ = FACTOR_GROUP_SEQ; } public Object getGROUP_SHOW_LAYOUT() { return GROUP_SHOW_LAYOUT; } public void setGROUP_SHOW_LAYOUT(Object GROUP_SHOW_LAYOUT) { this.GROUP_SHOW_LAYOUT = GROUP_SHOW_LAYOUT; } public int getRISK_FACTOR_ID() { return RISK_FACTOR_ID; } public void setRISK_FACTOR_ID(int RISK_FACTOR_ID) { this.RISK_FACTOR_ID = RISK_FACTOR_ID; } public String getRISK_FACTOR_NAME() { return RISK_FACTOR_NAME; } public void setRISK_FACTOR_NAME(String RISK_FACTOR_NAME) { this.RISK_FACTOR_NAME = RISK_FACTOR_NAME; } public int getSCORE_SHOW_TYPE() { return SCORE_SHOW_TYPE; } public void setSCORE_SHOW_TYPE(int SCORE_SHOW_TYPE) { this.SCORE_SHOW_TYPE = SCORE_SHOW_TYPE; } public int getMUTEX_GROUP() { return MUTEX_GROUP; } public void setMUTEX_GROUP(int MUTEX_GROUP) { this.MUTEX_GROUP = MUTEX_GROUP; } public String getIsslect() { return isslect; } public void setIsslect(String isslect) { this.isslect = isslect; } public String getANALYSIS_SOURCE_STR() { return ANALYSIS_SOURCE_STR; } public void setANALYSIS_SOURCE_STR(String ANALYSIS_SOURCE_STR) { this.ANALYSIS_SOURCE_STR = ANALYSIS_SOURCE_STR; } public String getCURRENT_DESC() { return CURRENT_DESC; } public void setCURRENT_DESC(String CURRENT_DESC) { this.CURRENT_DESC = CURRENT_DESC; } public List<OptionListBean> getOptionList() { return optionList; } public void setOptionList(List<OptionListBean> optionList) { this.optionList = optionList; } public static class OptionListBean implements Serializable { private int RISK_FACTOR_ID; private int FACTOR_OPTION_ID; private String FACTOR_OPTION; private String OPTION_TYPE; private Object VALUE_START; private Object VALUE_END; private Object SEX; private int AGE_BEGIN; private int AGE_END; private int RISK_SCORE; private int CHANGE_FLAG; private Object RISK_SCORE_CHANGE; private int RISK_LEVEL; private Object DISEASE_CODE; private Object BAD_HABITS; private Object BAD_HABITS_DESC; private Object BAD_HABITS_IMPROVE; private boolean itemChecked; public boolean isItemChecked() { return itemChecked; } public void setItemChecked(boolean itemChecked) { this.itemChecked = itemChecked; } public int getRISK_FACTOR_ID() { return RISK_FACTOR_ID; } public void setRISK_FACTOR_ID(int RISK_FACTOR_ID) { this.RISK_FACTOR_ID = RISK_FACTOR_ID; } public int getFACTOR_OPTION_ID() { return FACTOR_OPTION_ID; } public void setFACTOR_OPTION_ID(int FACTOR_OPTION_ID) { this.FACTOR_OPTION_ID = FACTOR_OPTION_ID; } public String getFACTOR_OPTION() { return FACTOR_OPTION; } public void setFACTOR_OPTION(String FACTOR_OPTION) { this.FACTOR_OPTION = FACTOR_OPTION; } public String getOPTION_TYPE() { return OPTION_TYPE; } public void setOPTION_TYPE(String OPTION_TYPE) { this.OPTION_TYPE = OPTION_TYPE; } public Object getVALUE_START() { return VALUE_START; } public void setVALUE_START(Object VALUE_START) { this.VALUE_START = VALUE_START; } public Object getVALUE_END() { return VALUE_END; } public void setVALUE_END(Object VALUE_END) { this.VALUE_END = VALUE_END; } public Object getSEX() { return SEX; } public void setSEX(Object SEX) { this.SEX = SEX; } public int getAGE_BEGIN() { return AGE_BEGIN; } public void setAGE_BEGIN(int AGE_BEGIN) { this.AGE_BEGIN = AGE_BEGIN; } public int getAGE_END() { return AGE_END; } public void setAGE_END(int AGE_END) { this.AGE_END = AGE_END; } public int getRISK_SCORE() { return RISK_SCORE; } public void setRISK_SCORE(int RISK_SCORE) { this.RISK_SCORE = RISK_SCORE; } public int getCHANGE_FLAG() { return CHANGE_FLAG; } public void setCHANGE_FLAG(int CHANGE_FLAG) { this.CHANGE_FLAG = CHANGE_FLAG; } public Object getRISK_SCORE_CHANGE() { return RISK_SCORE_CHANGE; } public void setRISK_SCORE_CHANGE(Object RISK_SCORE_CHANGE) { this.RISK_SCORE_CHANGE = RISK_SCORE_CHANGE; } public int getRISK_LEVEL() { return RISK_LEVEL; } public void setRISK_LEVEL(int RISK_LEVEL) { this.RISK_LEVEL = RISK_LEVEL; } public Object getDISEASE_CODE() { return DISEASE_CODE; } public void setDISEASE_CODE(Object DISEASE_CODE) { this.DISEASE_CODE = DISEASE_CODE; } public Object getBAD_HABITS() { return BAD_HABITS; } public void setBAD_HABITS(Object BAD_HABITS) { this.BAD_HABITS = BAD_HABITS; } public Object getBAD_HABITS_DESC() { return BAD_HABITS_DESC; } public void setBAD_HABITS_DESC(Object BAD_HABITS_DESC) { this.BAD_HABITS_DESC = BAD_HABITS_DESC; } public Object getBAD_HABITS_IMPROVE() { return BAD_HABITS_IMPROVE; } public void setBAD_HABITS_IMPROVE(Object BAD_HABITS_IMPROVE) { this.BAD_HABITS_IMPROVE = BAD_HABITS_IMPROVE; } } } } } } } } ``` 网络请求的时候 doRiskTableListGet()这个方法报错 ``` public class RiskAssessmentModel implements IRiskAssessmentContart.IRiskAssessmentModel { @SuppressLint("CheckResult") @Override public void getRiskAssessment(HashMap<String, Object> params, final IRequestCallback iRequestCallback) { RetrofitUtils.getInstance().createService(IRetrofitServer.class) .doRiskTableListGet(ApiService.RISK_TABLE_LIST, params) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Consumer<RiskAssessmentBean>() { @Override public void accept(RiskAssessmentBean riskAssessmentBean) throws Exception { if (iRequestCallback != null) { iRequestCallback.onSuccess(riskAssessmentBean); } } }, new Consumer<Throwable>() { @Override public void accept(Throwable throwable) throws Exception { if (iRequestCallback != null) { iRequestCallback.onFailed(throwable); } } }); } ``` 这是我进到doRiskTableListGet()方法内的代码 ``` @GET Observable<RiskAssessmentBean> doRiskTableListGet(@Url String apiUrl, @QueryMap HashMap<String, Object> params); ```
运行eclipse时出现的找不到gson-2.6.2.jar 文件,怎么回事
C:\Users\YY\.m2\repository\com\google\code\gson\gson\2.6.2\gson-2.6.2.jar (系统找不到指定的文件。)
android studio 上传代码到Git,添加的依赖包也会上传上去吗?
假如我在项目里面添加了一些第三方jar包 比如说 compile 'com.google.code.gson:gson:2.2.4' 。。。。。。 然后当我将代码上传到Git时,会把这些jar包一起上传上去吗?还是这是把这些compile保代码存着,然后当别人下载代码到android studio时,再在自己的电脑上面下载这些第三方jar包?
加载GSON的时候出现EOF错误
用GSON转换Json字符串为对象,从文件中加载字符串时: File f = new File(Environment.getExternalStorageDirectory() + File.separator + "jsonTest"); BufferedReader br = new BufferedReader(new FileReader(f)); String Json = br.readLine(); br.close(); Gson gson = new Gson(); dreFieldArray = gson.fromJson(Json, DreField[].class); 运行正常,但是,如果我用字符串资源代替的话: String Json = this.getString(R.string.NewFileData); Gson gson = new Gson(); dreFieldArray = gson.fromJson(Json, DreField[].class); 就会出现EOF异常。字符串是从文件中复制的,所以应该是完全相同的,异常是在对象之后出现多余的字符串,不知道该怎么解决?谢谢帮忙
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私...
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小人工智障。 思路可以运用在不同地方,主要介绍的是思路。
面试官问我:什么是消息队列?什么场景需要他?用了会出现什么问题?
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图、个人联系方式和人才交流群,欢迎Star和完善 前言 消息队列在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在消息队列的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸...
8年经验面试官详解 Java 面试秘诀
作者 |胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。 Java程序员准备和投递简历的实...
究竟你适不适合买Mac?
我清晰的记得,刚买的macbook pro回到家,开机后第一件事情,就是上了淘宝网,花了500元钱,找了一个上门维修电脑的师傅,上门给我装了一个windows系统。。。。。。 表砍我。。。 当时买mac的初衷,只是想要个固态硬盘的笔记本,用来运行一些复杂的扑克软件。而看了当时所有的SSD笔记本后,最终决定,还是买个好(xiong)看(da)的。 已经有好几个朋友问我mba怎么样了,所以今天尽量客观...
MyBatis研习录(01)——MyBatis概述与入门
MyBatis 是一款优秀的持久层框架,它支持定制化 SQL、存储过程以及高级映射。MyBatis原本是apache的一个开源项目iBatis, 2010年该项目由apache software foundation 迁移到了google code并改名为MyBatis 。2013年11月MyBatis又迁移到Github。
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外...
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip installselenium -ihttps://pypi.tuna.tsinghua.edu.cn/simple/ ...
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
Java工作4年来应聘要16K最后没要,细节如下。。。
前奏: 今天2B哥和大家分享一位前几天面试的一位应聘者,工作4年26岁,统招本科。 以下就是他的简历和面试情况。 基本情况: 专业技能: 1、&nbsp;熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、&nbsp;熟悉常用项目管理工具:SVN、GIT、MAVEN、Jenkins 3、&nbsp;熟悉Nginx、tomca...
Python爬虫精简步骤1 获取数据
爬虫,从本质上来说,就是利用程序在网上拿到对我们有价值的数据。 爬虫能做很多事,能做商业分析,也能做生活助手,比如:分析北京近两年二手房成交均价是多少?广州的Python工程师平均薪资是多少?北京哪家餐厅粤菜最好吃?等等。 这是个人利用爬虫所做到的事情,而公司,同样可以利用爬虫来实现巨大的商业价值。比如你所熟悉的搜索引擎——百度和谷歌,它们的核心技术之一也是爬虫,而且是超级爬虫。 从搜索巨头到人工...
Python绘图,圣诞树,花,爱心 | Turtle篇
每周每日,分享Python实战代码,入门资料,进阶资料,基础语法,爬虫,数据分析,web网站,机器学习,深度学习等等。 公众号回复【进群】沟通交流吧,QQ扫码进群学习吧 微信群 QQ群 1.画圣诞树 import turtle screen = turtle.Screen() screen.setup(800,600) circle = turtle.Turtle()...
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东...
破14亿,Python分析我国存在哪些人口危机!
一、背景 二、爬取数据 三、数据分析 1、总人口 2、男女人口比例 3、人口城镇化 4、人口增长率 5、人口老化(抚养比) 6、各省人口 7、世界人口 四、遇到的问题 遇到的问题 1、数据分页,需要获取从1949-2018年数据,观察到有近20年参数:LAST20,由此推测获取近70年的参数可设置为:LAST70 2、2019年数据没有放上去,可以手动添加上去 3、将数据进行 行列转换 4、列名...
web前端javascript+jquery知识点总结
1.Javascript 语法.用途 javascript 在前端网页中占有非常重要的地位,可以用于验证表单,制作特效等功能,它是一种描述语言,也是一种基于对象(Object)和事件驱动并具有安全性的脚本语言 ...
Python实战:抓肺炎疫情实时数据,画2019-nCoV疫情地图
今天,群里白垩老师问如何用python画武汉肺炎疫情地图。白垩老师是研究海洋生态与地球生物的学者,国家重点实验室成员,于不惑之年学习python,实为我等学习楷模。先前我并没有关注武汉肺炎的具体数据,也没有画过类似的数据分布图。于是就拿了两个小时,专门研究了一下,遂成此文。
听说想当黑客的都玩过这个Monyer游戏(1~14攻略)
第零关 进入传送门开始第0关(游戏链接) 请点击链接进入第1关: 连接在左边→ ←连接在右边 看不到啊。。。。(只能看到一堆大佬做完的留名,也能看到菜鸡的我,在后面~~) 直接fn+f12吧 &lt;span&gt;连接在左边→&lt;/span&gt; &lt;a href="first.php"&gt;&lt;/a&gt; &lt;span&gt;←连接在右边&lt;/span&gt; o...
在家远程办公效率低?那你一定要收好这个「在家办公」神器!
相信大家都已经收到国务院延长春节假期的消息,接下来,在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了,相反,对于沟通效率,文件协作,以及信息安全都有着极高的要求。有着非常多的挑战,比如: 1在异地互相不见面的会议上,如何提高沟通效率? 2文件之间的来往反馈如何做到及时性?如何保证信息安全? 3如何规划安排每天工作,以及如何进行成果验收? ...... ...
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!...
渗透测试-灰鸽子远控木马
木马概述 灰鸽子( Huigezi),原本该软件适用于公司和家庭管理,其功能十分强大,不但能监视摄像头、键盘记录、监控桌面、文件操作等。还提供了黑客专用功能,如:伪装系统图标、随意更换启动项名称和表述、随意更换端口、运行后自删除、毫无提示安装等,并采用反弹链接这种缺陷设计,使得使用者拥有最高权限,一经破解即无法控制。最终导致被黑客恶意使用。原作者的灰鸽子被定义为是一款集多种控制方式于一体的木马程序...
Python:爬取疫情每日数据
前言 目前每天各大平台,如腾讯、今日头条都会更新疫情每日数据,他们的数据源都是一样的,主要都是通过各地的卫健委官网通报。 以全国、湖北和上海为例,分别为以下三个网站: 国家卫健委官网:http://www.nhc.gov.cn/xcs/yqtb/list_gzbd.shtml 湖北卫健委官网:http://wjw.hubei.gov.cn/bmdt/ztzl/fkxxgzbdgrfyyq/xxfb...
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。 再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。 下文是原回答,希望能对你能有所启发。 如果我说,这个世界上人真的分三六九等,...
B 站上有哪些很好的学习资源?
哇说起B站,在小九眼里就是宝藏般的存在,放年假宅在家时一天刷6、7个小时不在话下,更别提今年的跨年晚会,我简直是跪着看完的!! 最早大家聚在在B站是为了追番,再后来我在上面刷欧美新歌和漂亮小姐姐的舞蹈视频,最近两年我和周围的朋友们已经把B站当作学习教室了,而且学习成本还免费,真是个励志的好平台ヽ(.◕ฺˇд ˇ◕ฺ;)ノ 下面我们就来盘点一下B站上优质的学习资源: 综合类 Oeasy: 综合...
雷火神山直播超两亿,Web播放器事件监听是怎么实现的?
Web播放器解决了在手机浏览器和PC浏览器上播放音视频数据的问题,让视音频内容可以不依赖用户安装App,就能进行播放以及在社交平台进行传播。在视频业务大数据平台中,播放数据的统计分析非常重要,所以Web播放器在使用过程中,需要对其内部的数据进行收集并上报至服务端,此时,就需要对发生在其内部的一些播放行为进行事件监听。 那么Web播放器事件监听是怎么实现的呢? 01 监听事件明细表 名...
3万字总结,Mysql优化之精髓
本文知识点较多,篇幅较长,请耐心学习 MySQL已经成为时下关系型数据库产品的中坚力量,备受互联网大厂的青睐,出门面试想进BAT,想拿高工资,不会点MySQL优化知识,拿offer的成功率会大大下降。 为什么要优化 系统的吞吐量瓶颈往往出现在数据库的访问速度上 随着应用程序的运行,数据库的中的数据会越来越多,处理时间会相应变慢 数据是存放在磁盘上的,读写速度无法和内存相比 如何优化 设计...
Python新型冠状病毒疫情数据自动爬取+统计+发送报告+数据屏幕(三)发送篇
今天介绍的项目是使用 Itchat 发送统计报告 项目功能设计: 定时爬取疫情数据存入Mysql 进行数据分析制作疫情报告 使用itchat给亲人朋友发送分析报告 基于Django做数据屏幕 使用Tableau做数据分析 来看看最终效果 目前已经完成,预计2月12日前更新 使用 itchat 发送数据统计报告 itchat 是一个基于 web微信的一个框架,但微信官方并不允许使用这...
作为程序员的我,大学四年一直自学,全靠这些实用工具和学习网站!
我本人因为高中沉迷于爱情,导致学业荒废,后来高考,毫无疑问进入了一所普普通通的大学,实在惭愧???? 我又是那么好强,现在学历不行,没办法改变的事情了,所以,进入大学开始,我就下定决心,一定要让自己掌握更多的技能,尤其选择了计算机这个行业,一定要多学习技术。 在进入大学学习不久后,我就认清了一个现实:我这个大学的整体教学质量和学习风气,真的一言难尽,懂的人自然知道怎么回事? 怎么办?我该如何更好的提升自...
粒子群算法求解物流配送路线问题(python)
1.Matlab实现粒子群算法的程序代码:https://www.cnblogs.com/kexinxin/p/9858664.html matlab代码求解函数最优值:https://blog.csdn.net/zyqblog/article/details/80829043 讲解通俗易懂,有数学实例的博文:https://blog.csdn.net/daaikuaichuan/article/...
教你如何编写第一个简单的爬虫
很多人知道爬虫,也很想利用爬虫去爬取自己想要的数据,那么爬虫到底怎么用呢?今天就教大家编写一个简单的爬虫。 下面以爬取笔者的个人博客网站为例获取第一篇文章的标题名称,教大家学会一个简单的爬虫。 第一步:获取页面 #!/usr/bin/python # coding: utf-8 import requests #引入包requests link = "http://www.santostang....
前端JS初级面试题二 (。•ˇ‸ˇ•。)老铁们!快来瞧瞧自己都会了么
1. 传统事件绑定和符合W3C标准的事件绑定有什么区别? 传统事件绑定 &lt;div onclick=""&gt;123&lt;/div&gt; div1.onclick = function(){}; &lt;button onmouseover=""&gt;&lt;/button&gt; 注意: 如果给同一个元素绑定了两次或多次相同类型的事件,那么后面的绑定会覆盖前面的绑定 (不支持DOM事...
情人节来了,教你个用 Python 表白的技巧
作者:@明哥 公众号:Python编程时光 2020年,这个看起来如此浪漫的年份,你还是一个人吗? 难不成我还能是一条狗? 18年的时候,写过一篇介绍如何使用 Python 来表白的文章。 虽然创意和使用效果都不错,但有一缺点,这是那个exe文件,女神需要打开电脑,才有可能参与进来,进而被你成功"调戏”。 由于是很早期的文章了,应该有很多人没有看过。 没有看过的,你可以点击这里查看:用Pyt...
相关热词 c#如何定义数组列表 c#倒序读取txt文件 java代码生成c# c# tcp发送数据 c#解决时间格式带星期 c#类似hashmap c#设置istbox的值 c#获取多线程返回值 c# 包含数字 枚举 c# timespan
立即提问