1. Null pointer exception:
Request processing failed; nested exception is java.lang.NullPointerException java.lang.NullPointerException com.atguigu.mvc.controller.NodesController.getFilesAndSendId(NodesController.java:61)
See the exception address and check the control layer

Control level, line 61:
List<FilePath> files = fileService.getFiles();
current
@RequestMapping(value = "/getFilesAndSendId/{sensor_id}",method = RequestMethod.GET)
Parameter sensor_id is passed;
Solution to null pointer:
Original:
private FileService fileService;
Change to: add @Autowired annotation
@Autowired
private FileService fileService;
If there is any other error when you run the codes:
Servlet.init() of Servlet[DispatcherServlet] raises an exception. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘nodesController’: Unsatisfied dependency expressed through field ‘fileService’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.atguigu.mvc.service.FileService’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
Solution:
Check if the @Service annotation is added to the implementation class here
Read More:
- [Solved] ssm Error: Error creating bean with name ‘employeeController’: Injection of autowired dependencies failed
- Spring interdependence error: beancurrentyincreationexception unsatisfieddependencyexception
- Spring Project Error: Error creating bean with name [How to Solve]
- Springboot integration shiro error: UnsatisfiedDependencyException: Error creating bean with name ‘getShiroFilterFact
- [Solved] org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xxx‘
- [Solved] Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type…
- [Solved] Error creating bean with name ‘org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0‘:
- [Solved] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
- [Solved] nacos Startup Error: nested exception is java.lang.RuntimeException: java.lang.RuntimeException: [db-load-error
- [Solved] spring boot Startup Error: Error creating bean with name ‘requestMappingHandlerMapping‘ defined in class path
- [Solved] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org
- JPA multiple-data source startup error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘t
- [Solved] Rabbitmq injection failed, bean creation failed, error creating bean with name ‘rabbitconnectionfactory’‘
- springboot Integrate mybatis Error: Error creating bean with name ‘deptController‘: Unsatisfied dependency expresse
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- Error creating bean with name ‘adminMapper‘ Injection of resource dependencies failed
- How to Solve Error-SpringCloud-Feign and Sentinel integrate error
- [Solved] In case of “transactionmanager” while setting bean property “transactionmanager” error
- [Solved]Org.springframework.beans.factory.nosuchbeandefinitionexception error reported