GithubHelp home page GithubHelp logo

Comments (4)

ggj2010 avatar ggj2010 commented on July 18, 2024

没有理解你这句话的意思哦 “”在配置数据源roundRobinDataSouceProxy()方法不需要声明bean,使用proxy.afterPropertiesSet();就好了“”
关于 Springboot1.4 并没有解决依赖循环的问题。
是因为 算是spring1.4.0的一个bug 你看下这个类DataSourceProperties提交记录备注就知道了

from javabase.

zowbman avatar zowbman commented on July 18, 2024

先回答你close掉的那个问题吧,SpringContextHolder类实现了ApplicationContextAware,获取applicationContext,会比带注解@configuration的类执行慢,我这边是这样子

第二个问题:请看看我的代码https://github.com/zowbman/zh_rms/blob/master/src/main/java/com/rms/config/readwriteseparation/datasource/DataSourceConfig.java

roundRobinDataSouceProxy()方法并没有使用注解@bean声明,因为如果使用@bean注解声明此方法,在方法内获取dataSource会出现循环依赖的问题

from javabase.

zowbman avatar zowbman commented on July 18, 2024

我入坑java 一年了,并且大概浏览了你的github,很不错里面的知识,希望向你学习

from javabase.

ggj2010 avatar ggj2010 commented on July 18, 2024

相互学习!

from javabase.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.