Comments (4)
可以贴上报错信息吗,方便我排查
from spring-boot-demo.
`package com.easy.mybatis.multidatasource.config;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
@aspect
@component
public class DataSourceAop {
@pointcut("@annotation(com.easy.mybatis.multidatasource.annotation.Master) " +
"|| execution(* com.easy.mybatis.multidatasource.service...insert(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service...add(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service...update(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service...edit(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service...delete(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service...remove(..))")
public void writePointcut() {
}
@Pointcut("!@annotation(com.easy.mybatis.multidatasource.annotation.Master) " +
"&& (execution(* com.easy.mybatis.multidatasource.service..*.select*(..)) " +
"|| execution(* com.easy.mybatis.multidatasource.service..*.get*(..)))")
public void readPointcut() {
}`
您看,readPointCut,里面的注解在代码22行,抱歉截屏不了
from spring-boot-demo.
这个没有错的,你注意看下括号,类似这样(!master&&(select||get)。表示没有master注解并且是select或get开头的方法,去读库取数据。
from spring-boot-demo.
抱歉,没看见前面的非,不好意思
from spring-boot-demo.
Related Issues (13)
- auth-code-server error HOT 2
- 集群环境可以保证定时任务只在一个节点执行吗? HOT 1
- 提几点个人建议 HOT 2
- 能添加mqtt demo嘛 HOT 2
- refresh_token 报错 Internal Server Error HOT 1
- Sign 项目bug HOT 5
- 防重放攻击的实例中,header中的Sign值是怎么生成的?
- LEETCODE 538 HOT 1
- cloud-alibaba HOT 3
- 前端JS生成sign的问题 HOT 1
- 导入之后报错 HOT 2
- sign 这个项目 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 spring-boot-demo.