When developing with spring annotations, do not use the new object method in the program you test. If the new object is used, the attributes or objects injected by @Autowired in its class will not be successfully generated, resulting in a null pointer exception.
Solution: write springmvc similar way to trigger, everything can be handled by spring itself