Comments (6)
@randeexiong 跟mybatis的xml方式使用是不会影响的,这个问题应该是你配置的扫描xml位置存在问题
from api-boot.
我新建了一个项目,最开始只使用mybatis是可以的,但一加上ApiBoot Mybatis Enhance依赖,其他内容没有任何更改的情况下,就会
报错Invalid bound statement (not found)
from api-boot.
每一个依赖都有独特的配置文件做支持,虽然有默认的配置,但是不一定能满足你的项目结构
from api-boot.
用的是最简单的 mybatis-starter 的配置,没有其他依赖
from api-boot.
这种都是项目开发中的最基本问题,你先把application.yml贴出来吧
from api-boot.
spring:
profiles:
active: dev
mvc:
converters:
preferred-json-mapper: fastJson
servlet:
multipart:
enabled: true
max-file-size: 30MB
max-request-size: 30MB
server:
port: 123456
mybatis:
type-aliases-package: org.minbox.framework.api.boot.cbrc.stateverify.entity
mapper-locations:
- classpath:mapper/*.xml
configuration:
map-underscore-to-camel-case: true
# ====================== #
# ======开发环境配置====== #
# ====================== #
# 数据库配置
# 数据源配置
spring:
#druid数据源连接池,和pom配合使用,5项
datasource:
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/database1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username: root
password: root
initialSize: 5
minIdle: 5
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
# 配置监控统计拦截的filters,stat:监控统计、Log4j:日志记录、wall:防御sql注入
# filters: stat,wall,log4j
maxPoolPreparedStatementPerConnectionSize: 20
useGlobalDataSourceStat: true
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500
# 通过 connection-properties 属性打开 mergeSql 功能;慢 SQL 记录
filter:
wall:
enabled: true
stat:
enabled: true
log-slow-sql: true
slow-sql-millis: 10000
merge-sql: true
# 配置 DruidStatFilter
web-stat-filter:
enabled: true
url-pattern: /*
session-stat-enable: true
profile-enable: true
exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
# 配置 DruidStatViewServlet
stat-view-servlet:
enabled: true
# IP 白名单,没有配置或者为空,则允许所有访问
allow:
# IP 黑名单,若白名单也存在,则优先使用
deny:
# 禁用 HTML 中 Reset All 按钮
reset-enable: false
# 登录用户名/密码
login-username: root
login-password: 123
aop-patterns: com.druid.*
logging:
level:
org.minbox.framework.api.boot.cbrc.stateverify: debug
当不添加 api-boot-starter-mybatis-enhance
依赖是可以正常使用的,当添加 api-boot-starter-mybatis-enhance
依赖再去访问服务读取数据,将致可用的使用xml方式的mybaits,报错 Invalid bound statement (not found)
from api-boot.
Related Issues (20)
- 集成 "message-pipe" 分布式顺序消费管道框架
- 添加LoggingFactoryBeanCustomizers类来集合注入LoggingFactoryBeanCustomizer实例 HOT 1
- 升级Message Pipe版本为v1.0.1 HOT 1
- 修改Banner显示样式,新增输出官网以及博客地址
- 升级message pipe消息管道版本为 v1.0.2.RELESE
- 新增MessagePipeConfiguration配置类的自定义Customizer接口 HOT 1
- apiboot 从2.2.7.RELEASE升级到2.3.0RELEASE版本报错 HOT 1
- api-boot升级2.3.1版本报错 HOT 17
- 集成ssh-agent代理组件 HOT 1
- 自定义Oauth2认证失败响应格式 HOT 1
- refresh_token获取token报Handling error: InvalidGrantException, Invalid refresh token HOT 1
- 已经在ignoring-urls 添加了不需要授权的链接,但访问时候还是提示未授权错误 HOT 1
- 集成druid-spring-boot-starter 1.2.8 ,无法正常登陆,总是提示用户名密码错误,同样的配置在springboot中整合druid-spring-boot-starter 可正常登陆 HOT 4
- 启动报循环依赖错误 HOT 7
- api-boot-starter-logging 导致druid 监控界面无法登陆,提示用户名密码错误 HOT 8
- > 你可以看下我的博客:https://blog.minbox.org/
- 请求指导, api-boot-starter-mybatis-enhance启动报错,执行重载SqlSource失败 HOT 3
- Dependency org.apache.httpcomponents:httpclient, leading to CVE problem
- 支持统一接入飞书、钉钉、企业微信群消息webhook,以及个人工作通知项目发送,OA流程接入等api HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-boot.