在业务层 加自动注入的注解报红色波浪线
解决措施:去mapper包里面的类加上注解加上
@Repository
public interface UserMapper {
User login(String name);
List<User> getAll(User user);
}
再去启动类加@MapperScan("这里是mapper类路径")
@SpringBootApplication
@MapperScan("com.linlin.mapper")
public class SpringbootShiroApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootShiroApplication.class, args);
}
}