Commit 79018ec1 authored by xiandafu's avatar xiandafu
Browse files

update 错误信息

parent 42466f7a
...@@ -10,20 +10,20 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,20 +10,20 @@ 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;
/** /**
* 模拟所有还未实现的视图,或者json,或者直接访问相应的html页面 * 没有找到匹配的Controller
* @author xiandafu * @author xiandafu
* *
*/ */
@Controller @Controller
public class SimulateController { public class ControllerNotFound {
@Autowired @Autowired
WebSimulate webSimulate; WebSimulate webSimulate;
Log log = LogFactory.getLog(SimulateController.class); Log log = LogFactory.getLog(ControllerNotFound.class);
@RequestMapping("/**/*.do") @RequestMapping("/**/*.do")
public void simluateWeb(HttpServletRequest request, HttpServletResponse response) { public void error(HttpServletRequest request, HttpServletResponse response) {
response.setContentType("text/html;charset=UTF-8"); response.setContentType("text/html;charset=UTF-8");
log.info("没有配置 url "+request.getRequestURI()+",使用模拟MVC功能使用前后端分离"); log.info("没有配置 url "+request.getRequestURI()+",确认所访问Controller是否存在,是否被Spring Boot管理");
webSimulate.execute(request, response); throw new RuntimeException("未找到Controller类处理此请求 "+request.getRequestURI());
} }
......
package ${package}; package ${package};
import ${basePackage}.dao.${entity.name}Dao;
import ${basePackage}.entity.${entity.name};
import com.ibeetl.admin.core.service.CoreBaseService;
import com.ibeetl.admin.core.util.PlatformException;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
{basePackage}.dao.${entity.name}Dao;
import ${basePackage}.entity.${entity.name};
/** /**
* ${entity.displayName} Service * ${entity.displayName} Service
...@@ -13,7 +25,7 @@ import ${basePackage}.entity.${entity.name}; ...@@ -13,7 +25,7 @@ import ${basePackage}.entity.${entity.name};
\@Service \@Service
\@Transactional \@Transactional
public class ${entity.name}Service extends BaseService<${entity.name}>{ public class ${entity.name}Service extends CoreBaseService<${entity.name}>{
\@Autowired private ${entity.name}Dao ${entity.code}Dao; \@Autowired private ${entity.name}Dao ${entity.code}Dao;
......
...@@ -7,8 +7,8 @@ queryByCondition ...@@ -7,8 +7,8 @@ queryByCondition
t.* t.*
\@} \@}
from ${entity.tableName} t from ${entity.tableName} t
where del_flag=0 where 1=1
\@//数据权限,该sql语句功能点 \@//数据权限,该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function("${entity.code}.query")# and #function("${entity.code}.query")#
@for(attr in entity.list){ @for(attr in entity.list){
@if(attr.showInQuery){ @if(attr.showInQuery){
......
3. # 1.3.1
\ No newline at end of file * 更改beetl版本到最新版本
\ No newline at end of file
Supports Markdown
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