Spring annotation development object is null

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325104697&siteId=291194637