package com.ljh35.controller; import com.ljh35.service.UserService; import org.springframework.stereotype.Controller; import javax.annotation.Resource; @Controller public class UserController { @Resource(name = "userService") private UserService userService; public void findById(){ this.userService.save(); } }