Commit 9054214c by stylefeng

规范注入

parent abbd6f73
...@@ -21,7 +21,7 @@ import java.util.Map; ...@@ -21,7 +21,7 @@ import java.util.Map;
public class BlackboardController extends BaseController { public class BlackboardController extends BaseController {
@Autowired @Autowired
INoticeService noticeService; private INoticeService noticeService;
/** /**
* 跳转到黑板 * 跳转到黑板
......
...@@ -13,6 +13,7 @@ import com.stylefeng.guns.core.util.ToolUtil; ...@@ -13,6 +13,7 @@ import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.system.model.Dept; import com.stylefeng.guns.modular.system.model.Dept;
import com.stylefeng.guns.modular.system.service.IDeptService; import com.stylefeng.guns.modular.system.service.IDeptService;
import com.stylefeng.guns.modular.system.warpper.DeptWarpper; import com.stylefeng.guns.modular.system.warpper.DeptWarpper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -20,7 +21,6 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -20,7 +21,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -36,8 +36,8 @@ public class DeptController extends BaseController { ...@@ -36,8 +36,8 @@ public class DeptController extends BaseController {
private String PREFIX = "/system/dept/"; private String PREFIX = "/system/dept/";
@Resource @Autowired
IDeptService deptService; private IDeptService deptService;
/** /**
* 跳转到部门管理首页 * 跳转到部门管理首页
......
...@@ -14,6 +14,7 @@ import com.stylefeng.guns.core.util.ToolUtil; ...@@ -14,6 +14,7 @@ import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.system.model.Dict; import com.stylefeng.guns.modular.system.model.Dict;
import com.stylefeng.guns.modular.system.service.IDictService; import com.stylefeng.guns.modular.system.service.IDictService;
import com.stylefeng.guns.modular.system.warpper.DictWarpper; import com.stylefeng.guns.modular.system.warpper.DictWarpper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -21,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -21,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -37,8 +37,8 @@ public class DictController extends BaseController { ...@@ -37,8 +37,8 @@ public class DictController extends BaseController {
private String PREFIX = "/system/dict/"; private String PREFIX = "/system/dict/";
@Resource @Autowired
IDictService dictService; private IDictService dictService;
/** /**
* 跳转到字典管理首页 * 跳转到字典管理首页
......
...@@ -9,7 +9,6 @@ import org.springframework.stereotype.Controller; ...@@ -9,7 +9,6 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -28,11 +27,11 @@ import java.io.IOException; ...@@ -28,11 +27,11 @@ import java.io.IOException;
@RequestMapping("/kaptcha") @RequestMapping("/kaptcha")
public class KaptchaController { public class KaptchaController {
@Resource @Autowired
private GunsProperties gunsProperties; private GunsProperties gunsProperties;
@Autowired @Autowired
Producer producer; private Producer producer;
/** /**
* 生成验证码 * 生成验证码
......
...@@ -12,13 +12,13 @@ import com.stylefeng.guns.core.support.BeanKit; ...@@ -12,13 +12,13 @@ import com.stylefeng.guns.core.support.BeanKit;
import com.stylefeng.guns.modular.system.model.OperationLog; import com.stylefeng.guns.modular.system.model.OperationLog;
import com.stylefeng.guns.modular.system.service.IOperationLogService; import com.stylefeng.guns.modular.system.service.IOperationLogService;
import com.stylefeng.guns.modular.system.warpper.LogWarpper; import com.stylefeng.guns.modular.system.warpper.LogWarpper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -34,7 +34,7 @@ public class LogController extends BaseController { ...@@ -34,7 +34,7 @@ public class LogController extends BaseController {
private static String PREFIX = "/system/log/"; private static String PREFIX = "/system/log/";
@Resource @Autowired
private IOperationLogService operationLogService; private IOperationLogService operationLogService;
/** /**
......
...@@ -36,10 +36,10 @@ import static com.stylefeng.guns.core.support.HttpKit.getIp; ...@@ -36,10 +36,10 @@ import static com.stylefeng.guns.core.support.HttpKit.getIp;
public class LoginController extends BaseController { public class LoginController extends BaseController {
@Autowired @Autowired
IMenuService menuService; private IMenuService menuService;
@Autowired @Autowired
IUserService userService; private IUserService userService;
/** /**
* 跳转到主页 * 跳转到主页
......
...@@ -10,12 +10,12 @@ import com.stylefeng.guns.core.common.constant.factory.PageFactory; ...@@ -10,12 +10,12 @@ import com.stylefeng.guns.core.common.constant.factory.PageFactory;
import com.stylefeng.guns.modular.system.model.OperationLog; import com.stylefeng.guns.modular.system.model.OperationLog;
import com.stylefeng.guns.modular.system.service.ILoginLogService; import com.stylefeng.guns.modular.system.service.ILoginLogService;
import com.stylefeng.guns.modular.system.warpper.LogWarpper; import com.stylefeng.guns.modular.system.warpper.LogWarpper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -31,7 +31,7 @@ public class LoginLogController extends BaseController { ...@@ -31,7 +31,7 @@ public class LoginLogController extends BaseController {
private static String PREFIX = "/system/log/"; private static String PREFIX = "/system/log/";
@Resource @Autowired
private ILoginLogService loginLogService; private ILoginLogService loginLogService;
/** /**
......
...@@ -18,6 +18,7 @@ import com.stylefeng.guns.core.util.ToolUtil; ...@@ -18,6 +18,7 @@ import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.system.model.Menu; import com.stylefeng.guns.modular.system.model.Menu;
import com.stylefeng.guns.modular.system.service.IMenuService; import com.stylefeng.guns.modular.system.service.IMenuService;
import com.stylefeng.guns.modular.system.warpper.MenuWarpper; import com.stylefeng.guns.modular.system.warpper.MenuWarpper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
...@@ -26,7 +27,6 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -26,7 +27,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -43,8 +43,8 @@ public class MenuController extends BaseController { ...@@ -43,8 +43,8 @@ public class MenuController extends BaseController {
private static String PREFIX = "/system/menu/"; private static String PREFIX = "/system/menu/";
@Resource @Autowired
IMenuService menuService; private IMenuService menuService;
/** /**
* 跳转到菜单列表列表页面 * 跳转到菜单列表列表页面
......
...@@ -12,6 +12,7 @@ import com.stylefeng.guns.core.util.ToolUtil; ...@@ -12,6 +12,7 @@ import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.system.model.Notice; import com.stylefeng.guns.modular.system.model.Notice;
import com.stylefeng.guns.modular.system.service.INoticeService; import com.stylefeng.guns.modular.system.service.INoticeService;
import com.stylefeng.guns.modular.system.warpper.NoticeWrapper; import com.stylefeng.guns.modular.system.warpper.NoticeWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -19,7 +20,6 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -19,7 +20,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -36,7 +36,7 @@ public class NoticeController extends BaseController { ...@@ -36,7 +36,7 @@ public class NoticeController extends BaseController {
private String PREFIX = "/system/notice/"; private String PREFIX = "/system/notice/";
@Resource @Autowired
private INoticeService noticeService; private INoticeService noticeService;
/** /**
......
...@@ -20,6 +20,7 @@ import com.stylefeng.guns.modular.system.model.User; ...@@ -20,6 +20,7 @@ import com.stylefeng.guns.modular.system.model.User;
import com.stylefeng.guns.modular.system.service.IRoleService; import com.stylefeng.guns.modular.system.service.IRoleService;
import com.stylefeng.guns.modular.system.service.IUserService; import com.stylefeng.guns.modular.system.service.IUserService;
import com.stylefeng.guns.modular.system.warpper.RoleWarpper; import com.stylefeng.guns.modular.system.warpper.RoleWarpper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
...@@ -28,7 +29,6 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -28,7 +29,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -45,11 +45,11 @@ public class RoleController extends BaseController { ...@@ -45,11 +45,11 @@ public class RoleController extends BaseController {
private static String PREFIX = "/system/role"; private static String PREFIX = "/system/role";
@Resource @Autowired
IUserService userService; private IUserService userService;
@Resource @Autowired
IRoleService roleService; private IRoleService roleService;
/** /**
* 跳转到角色列表页面 * 跳转到角色列表页面
......
...@@ -23,13 +23,13 @@ import com.stylefeng.guns.modular.system.model.User; ...@@ -23,13 +23,13 @@ import com.stylefeng.guns.modular.system.model.User;
import com.stylefeng.guns.modular.system.service.IUserService; import com.stylefeng.guns.modular.system.service.IUserService;
import com.stylefeng.guns.modular.system.transfer.UserDto; import com.stylefeng.guns.modular.system.transfer.UserDto;
import com.stylefeng.guns.modular.system.warpper.UserWarpper; import com.stylefeng.guns.modular.system.warpper.UserWarpper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.naming.NoPermissionException; import javax.naming.NoPermissionException;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.File; import java.io.File;
...@@ -50,10 +50,10 @@ public class UserMgrController extends BaseController { ...@@ -50,10 +50,10 @@ public class UserMgrController extends BaseController {
private static String PREFIX = "/system/user/"; private static String PREFIX = "/system/user/";
@Resource @Autowired
private GunsProperties gunsProperties; private GunsProperties gunsProperties;
@Resource @Autowired
private IUserService userService; private IUserService userService;
/** /**
......
...@@ -19,12 +19,12 @@ import java.util.Map; ...@@ -19,12 +19,12 @@ import java.util.Map;
public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements IDeptService { public class DeptServiceImpl extends ServiceImpl<DeptMapper, Dept> implements IDeptService {
@Resource @Resource
DeptMapper deptMapper; private DeptMapper deptMapper;
@Override @Override
public void deleteDept(Integer deptId) { public void deleteDept(Integer deptId) {
Dept dept = deptMapper.selectById(deptId); Dept dept = deptMapper.selectById(deptId);
Wrapper<Dept> wrapper = new EntityWrapper<>(); Wrapper<Dept> wrapper = new EntityWrapper<>();
wrapper = wrapper.like("pids", "%[" + dept.getId() + "]%"); wrapper = wrapper.like("pids", "%[" + dept.getId() + "]%");
List<Dept> subDepts = deptMapper.selectList(wrapper); List<Dept> subDepts = deptMapper.selectList(wrapper);
......
...@@ -22,7 +22,7 @@ import static com.stylefeng.guns.core.common.constant.factory.MutiStrFactory.*; ...@@ -22,7 +22,7 @@ import static com.stylefeng.guns.core.common.constant.factory.MutiStrFactory.*;
public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements IDictService { public class DictServiceImpl extends ServiceImpl<DictMapper, Dict> implements IDictService {
@Resource @Resource
DictMapper dictMapper; private DictMapper dictMapper;
@Override @Override
public void addDict(String dictName, String dictValues) { public void addDict(String dictName, String dictValues) {
......
...@@ -24,7 +24,7 @@ import java.util.Map; ...@@ -24,7 +24,7 @@ import java.util.Map;
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IMenuService { public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IMenuService {
@Resource @Resource
MenuMapper menuMapper; private MenuMapper menuMapper;
@Override @Override
public void delMenu(Long menuId) { public void delMenu(Long menuId) {
......
...@@ -19,10 +19,10 @@ import java.util.Map; ...@@ -19,10 +19,10 @@ import java.util.Map;
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService { public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IRoleService {
@Resource @Resource
RoleMapper roleMapper; private RoleMapper roleMapper;
@Resource @Resource
RelationMapper relationMapper; private RelationMapper relationMapper;
@Override @Override
@Transactional(readOnly = false) @Transactional(readOnly = false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment