LMLPHP后院

spring boot jpa 多个数据源配置

p.nb.config; import javax.persistence.EntityManagerFactory; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.jdbc.DataSourceBu...

Spring Boot Jpa 使用原生 SQL 和动态分页

页报个错:Cannot use native queries with dynamic sorting and/or pagination in method public abstract org.springframework.data.domain.Page Jpa 的原生 SQL 对命名没有严格的要求,如下示例:package com.lmlphp.test; import org.springframework.da...

springboot mybatis 多数据源配置

g.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; impo...

解决 springboot Interceptor @Autowired null

看如下代码块:package com.lmlphp.nb.config; import com.lmlphp.nb.interceptor.WebInterceptor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.sprin...
2024-12-27 08:54:03 1735260843 0.018207