代码生成器修改了包名启动程序 No mapping found 和No handler found
版本:renren-fast |
开发环境:google |
代码生成器修改了包名package com.softpack.modules.basic.controller;
启动程序后访问提示 No mapping found for HTTP request with URI 和No handler found for OPTIONS
img[//cdn.renren.io/4ba5920190213233733866.png]
img[//cdn.renren.io/ca587201902132342383334.png]
img[//cdn.renren.io/4d07a201902132342466814.png]
[pre]
package com.softpack.modules.basic.controller;
import java.util.Arrays;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.softpack.modules.basic.entity.TDepartmentEntity;
import com.softpack.modules.basic.service.TDepartmentService;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
/**
* 部门档案
*
*/
@RestController
@RequestMapping("basic/tdepartment")
public class TDepartmentController {
@Autowired
private TDepartmentService tDepartmentService;
/**
* 列表
*/
@RequestMapping("/list")
@RequiresPermissions("basic:tdepartment:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = tDepartmentService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
@RequiresPermissions("basic:tdepartment:info")
public R info(@PathVariable("id") Long id){
TDepartmentEntity tDepartment = tDepartmentService.selectById(id);
return R.ok().put("tDepartment", tDepartment);
}
/**
* 保存
*/
@RequestMapping("/save")
@RequiresPermissions("basic:tdepartment:save")
public R save(@RequestBody TDepartmentEntity tDepartment){
tDepartmentService.insert(tDepartment);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@RequiresPermissions("basic:tdepartment:update")
public R update(@RequestBody TDepartmentEntity tDepartment){
tDepartmentService.updateById(tDepartment);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
@RequiresPermissions("basic:tdepartment:delete")
public R delete(@RequestBody Long[] ids){
tDepartmentService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}
[/pre]