GithubHelp home page GithubHelp logo

routing-data-source's Introduction

routing-data-source

Example of using Spring RoutingDataSource and custom annotations to determine concrete DataSource

routing-data-source's People

Contributors

afedulov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

routing-data-source's Issues

A bean named 'entityManagerFactory' that could not be found

I have used this approach to use separate databases for read and write operations but getting an exception that No bean named 'entityManagerFactory' available

Springboot = v2.2.4

`/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=60238:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath /Users/mac/dev/springboot/ontech/on-sb-user-ms/target/classes:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-data-jpa/2.2.4.RELEASE/spring-boot-starter-data-jpa-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-aop/2.2.4.RELEASE/spring-boot-starter-aop-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/spring-aop/5.2.3.RELEASE/spring-aop-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/aspectj/aspectjweaver/1.9.5/aspectjweaver-1.9.5.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/2.2.4.RELEASE/spring-boot-starter-jdbc-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/com/zaxxer/HikariCP/3.4.2/HikariCP-3.4.2.jar:/Users/mac/.m2/repository/org/springframework/spring-jdbc/5.2.3.RELEASE/spring-jdbc-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/jakarta/activation/jakarta.activation-api/1.2.1/jakarta.activation-api-1.2.1.jar:/Users/mac/.m2/repository/jakarta/persistence/jakarta.persistence-api/2.2.3/jakarta.persistence-api-2.2.3.jar:/Users/mac/.m2/repository/jakarta/transaction/jakarta.transaction-api/1.3.3/jakarta.transaction-api-1.3.3.jar:/Users/mac/.m2/repository/org/hibernate/hibernate-core/5.4.10.Final/hibernate-core-5.4.10.Final.jar:/Users/mac/.m2/repository/org/jboss/logging/jboss-logging/3.4.1.Final/jboss-logging-3.4.1.Final.jar:/Users/mac/.m2/repository/org/javassist/javassist/3.24.0-GA/javassist-3.24.0-GA.jar:/Users/mac/.m2/repository/net/bytebuddy/byte-buddy/1.10.6/byte-buddy-1.10.6.jar:/Users/mac/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar:/Users/mac/.m2/repository/org/jboss/jandex/2.1.1.Final/jandex-2.1.1.Final.jar:/Users/mac/.m2/repository/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar:/Users/mac/.m2/repository/org/dom4j/dom4j/2.1.1/dom4j-2.1.1.jar:/Users/mac/.m2/repository/org/hibernate/common/hibernate-commons-annotations/5.1.0.Final/hibernate-commons-annotations-5.1.0.Final.jar:/Users/mac/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.jar:/Users/mac/.m2/repository/org/glassfish/jaxb/txw2/2.3.2/txw2-2.3.2.jar:/Users/mac/.m2/repository/com/sun/istack/istack-commons-runtime/3.0.8/istack-commons-runtime-3.0.8.jar:/Users/mac/.m2/repository/org/jvnet/staxex/stax-ex/1.8.1/stax-ex-1.8.1.jar:/Users/mac/.m2/repository/com/sun/xml/fastinfoset/FastInfoset/1.2.16/FastInfoset-1.2.16.jar:/Users/mac/.m2/repository/org/springframework/data/spring-data-jpa/2.2.4.RELEASE/spring-data-jpa-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/data/spring-data-commons/2.2.4.RELEASE/spring-data-commons-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/spring-orm/5.2.3.RELEASE/spring-orm-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/spring-context/5.2.3.RELEASE/spring-context-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/spring-tx/5.2.3.RELEASE/spring-tx-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/spring-beans/5.2.3.RELEASE/spring-beans-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/Users/mac/.m2/repository/org/springframework/spring-aspects/5.2.3.RELEASE/spring-aspects-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-web/2.2.4.RELEASE/spring-boot-starter-web-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter/2.2.4.RELEASE/spring-boot-starter-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-logging/2.2.4.RELEASE/spring-boot-starter-logging-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/mac/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/mac/.m2/repository/org/apache/logging/log4j/log4j-to-slf4j/2.12.1/log4j-to-slf4j-2.12.1.jar:/Users/mac/.m2/repository/org/apache/logging/log4j/log4j-api/2.12.1/log4j-api-2.12.1.jar:/Users/mac/.m2/repository/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar:/Users/mac/.m2/repository/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/mac/.m2/repository/org/yaml/snakeyaml/1.25/snakeyaml-1.25.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-json/2.2.4.RELEASE/spring-boot-starter-json-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.10.2/jackson-datatype-jdk8-2.10.2.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.10.2/jackson-datatype-jsr310-2.10.2.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/module/jackson-module-parameter-names/2.10.2/jackson-module-parameter-names-2.10.2.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/2.2.4.RELEASE/spring-boot-starter-tomcat-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.30/tomcat-embed-core-9.0.30.jar:/Users/mac/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/9.0.30/tomcat-embed-el-9.0.30.jar:/Users/mac/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.30/tomcat-embed-websocket-9.0.30.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-starter-validation/2.2.4.RELEASE/spring-boot-starter-validation-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/jakarta/validation/jakarta.validation-api/2.0.2/jakarta.validation-api-2.0.2.jar:/Users/mac/.m2/repository/org/hibernate/validator/hibernate-validator/6.0.18.Final/hibernate-validator-6.0.18.Final.jar:/Users/mac/.m2/repository/org/springframework/spring-web/5.2.3.RELEASE/spring-web-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/spring-webmvc/5.2.3.RELEASE/spring-webmvc-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/spring-expression/5.2.3.RELEASE/spring-expression-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/module/jackson-module-kotlin/2.10.2/jackson-module-kotlin-2.10.2.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.10.2/jackson-databind-2.10.2.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.10.2/jackson-core-2.10.2.jar:/Users/mac/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.10.2/jackson-annotations-2.10.2.jar:/Users/mac/.m2/repository/org/jetbrains/kotlin/kotlin-reflect/1.3.61/kotlin-reflect-1.3.61.jar:/Users/mac/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.3.61/kotlin-stdlib-1.3.61.jar:/Users/mac/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.61/kotlin-stdlib-common-1.3.61.jar:/Users/mac/.m2/repository/org/jetbrains/annotations/13.0/annotations-13.0.jar:/Users/mac/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.61/kotlin-stdlib-jdk8-1.3.61.jar:/Users/mac/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.61/kotlin-stdlib-jdk7-1.3.61.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-devtools/2.2.4.RELEASE/spring-boot-devtools-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot/2.2.4.RELEASE/spring-boot-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/2.2.4.RELEASE/spring-boot-autoconfigure-2.2.4.RELEASE.jar:/Users/mac/.m2/repository/mysql/mysql-connector-java/8.0.19/mysql-connector-java-8.0.19.jar:/Users/mac/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.2/jakarta.xml.bind-api-2.3.2.jar:/Users/mac/.m2/repository/org/springframework/spring-core/5.2.3.RELEASE/spring-core-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/springframework/spring-jcl/5.2.3.RELEASE/spring-jcl-5.2.3.RELEASE.jar:/Users/mac/.m2/repository/org/modelmapper/modelmapper/2.3.5/modelmapper-2.3.5.jar:/Users/mac/.m2/repository/commons-dbcp/commons-dbcp/1.2.2/commons-dbcp-1.2.2.jar:/Users/mac/.m2/repository/commons-pool/commons-pool/1.6/commons-pool-1.6.jar com.ontech.onapp.userMs.UserMsApplicationKt

. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.2.4.RELEASE)

2020-02-03 18:37:02.284 INFO 6446 --- [ restartedMain] c.o.onapp.userMs.UserMsApplicationKt : Starting UserMsApplicationKt on Macs-MacBook-Pro.local with PID 6446 (/Users/mac/dev/springboot/ontech/on-sb-user-ms/target/classes started by mac in /Users/mac/dev/springboot/ontech/on-sb-user-ms)
2020-02-03 18:37:02.287 INFO 6446 --- [ restartedMain] c.o.onapp.userMs.UserMsApplicationKt : No active profile set, falling back to default profiles: default
2020-02-03 18:37:02.348 INFO 6446 --- [ restartedMain] o.s.b.devtools.restart.ChangeableUrls : The Class-Path manifest attribute in /Users/mac/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jaxb-runtime-2.3.2.jar referenced one or more files that do not exist: file:/Users/mac/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jakarta.xml.bind-api-2.3.2.jar,file:/Users/mac/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/txw2-2.3.2.jar,file:/Users/mac/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/istack-commons-runtime-3.0.8.jar,file:/Users/mac/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/stax-ex-1.8.1.jar,file:/Users/mac/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/FastInfoset-1.2.16.jar,file:/Users/mac/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.2/jakarta.activation-api-1.2.1.jar
2020-02-03 18:37:02.348 INFO 6446 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2020-02-03 18:37:02.349 INFO 6446 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2020-02-03 18:37:03.462 INFO 6446 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2020-02-03 18:37:03.539 INFO 6446 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 64ms. Found 1 JPA repository interfaces.
2020-02-03 18:37:04.440 INFO 6446 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8082 (http)
2020-02-03 18:37:04.453 INFO 6446 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-02-03 18:37:04.453 INFO 6446 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30]
2020-02-03 18:37:04.544 INFO 6446 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-02-03 18:37:04.544 INFO 6446 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2195 ms
2020-02-03 18:37:04.782 WARN 6446 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController' defined in file [/Users/mac/dev/springboot/ontech/on-sb-user-ms/target/classes/com/ontech/onapp/userMs/controllers/UserController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl' defined in file [/Users/mac/dev/springboot/ontech/on-sb-user-ms/target/classes/com/ontech/onapp/userMs/services/UserServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Cannot create inner bean '(inner bean)#5b2bb928' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#5b2bb928': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' available
2020-02-03 18:37:04.785 INFO 6446 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-02-03 18:37:04.803 INFO 6446 --- [ restartedMain] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-02-03 18:37:04.882 ERROR 6446 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Parameter 0 of constructor in com.ontech.onapp.userMs.services.UserServiceImpl required a bean named 'entityManagerFactory' that could not be found.

The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)

Action:

Consider defining a bean named 'entityManagerFactory' in your configuration.

Process finished with exit code 0`

Following is my configuration class with beans definitions

`package com.ontech.onapp.userMs.utils.configs

import com.ontech.onapp.userMs.database.routing.RoutingDataSource
import org.apache.commons.dbcp.BasicDataSource
import org.springframework.beans.factory.annotation.Value
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.LocaleResolver
import org.springframework.web.servlet.config.annotation.InterceptorRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
import org.springframework.web.servlet.i18n.CookieLocaleResolver
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor
import javax.sql.DataSource

@configuration

class Configuration: WebMvcConfigurer {
@value("${db.master.url}")
private val masterUrl: String? = null
@value("${db.replica.url}")
private val replicaUrl: String? = null
@bean
fun localeResolver(): LocaleResolver? {
return CookieLocaleResolver()
}

@Bean
fun localeInterceptor(): LocaleChangeInterceptor? {
    val localeInterceptor = LocaleChangeInterceptor()
    localeInterceptor.paramName = "lang"
    return localeInterceptor
}

override fun addInterceptors(registry: InterceptorRegistry) {
    registry.addInterceptor(localeInterceptor()!!)
}

@Bean
fun dataSource(): DataSource{
    val dataSource = RoutingDataSource()
    dataSource.setTargetDataSources(mapOf("MASTER" to dataSourceMaster(), "REPLICA" to dataSourceReplica()))
    dataSource.setDefaultTargetDataSource(dataSourceMaster())
    return  dataSource
}

@Bean
fun dataSourceMaster(): BasicDataSource{
    val masterDataSource = BasicDataSource()
    masterDataSource.driverClassName = "com.mysql.jdbc.Driver"
    masterDataSource.url = masterUrl
    masterDataSource.username = "root"
    masterDataSource.password = "123456"
    return  masterDataSource
}

@Bean
fun dataSourceReplica(): BasicDataSource{
    val masterDataSource = BasicDataSource()
    masterDataSource.driverClassName = "com.mysql.jdbc.Driver"
    masterDataSource.url = replicaUrl
    masterDataSource.username = "root"
    masterDataSource.password = "123456"
    return  masterDataSource
}

}`

Exception: No qualifying bean of type [website.fedulov.Main] is defined

Hi
I tried your sample, when I run it I got error as below, how can I do next? Can you help me to use Dynamic Multiple DataSources in Spring Data JPA?

DEBUG 18:20:44,975 [main]: Registered injected element on class [website.fedulov.aspect.ReadOnlyConnectionInterceptor]: AutowiredMethodElement for public void website.fedulov.aspect.ReadOnlyConnectionInterceptor.setOrder(int) - at org.springframework.beans.factory.annotation.InjectionMetadata.checkConfigMembers(InjectionMetadata.java:72)
DEBUG 18:20:44,976 [main]: Eagerly caching bean 'readOnlyInterceptor' to allow for resolving potential circular references - at org.springframework.beans.factory.support.DefaultListableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
DEBUG 18:20:44,976 [main]: Processing injected element of bean 'readOnlyInterceptor': AutowiredMethodElement for public void website.fedulov.aspect.ReadOnlyConnectionInterceptor.setOrder(int) - at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:86)
ReadOnlyConnectionInterceptor >>> order = 20
DEBUG 18:20:44,976 [main]: Finished creating instance of bean 'readOnlyInterceptor' - at org.springframework.beans.factory.support.DefaultListableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:484)
DEBUG 18:20:44,976 [main]: Returning cached instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor' - at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean(AbstractBeanFactory.java:251)
DEBUG 18:20:44,977 [main]: Returning cached instance of singleton bean 'org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor' - at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean(AbstractBeanFactory.java:251)
DEBUG 18:20:44,977 [main]: Returning cached instance of singleton bean 'org.springframework.orm.jpa.SharedEntityManagerCreator#0' - at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean(AbstractBeanFactory.java:251)
DEBUG 18:20:44,977 [main]: Returning cached instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory' - at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean(AbstractBeanFactory.java:251)
DEBUG 18:20:44,978 [main]: Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionalEventListenerFactory' - at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean(AbstractBeanFactory.java:251)
DEBUG 18:20:45,003 [main]: Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@17a9786] - at org.springframework.context.support.ClassPathXmlApplicationContext.initLifecycleProcessor(AbstractApplicationContext.java:769)
DEBUG 18:20:45,004 [main]: Returning cached instance of singleton bean 'lifecycleProcessor' - at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBean(AbstractBeanFactory.java:251)
DEBUG 18:20:45,006 [main]: Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties] - at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:81)
DEBUG 18:20:45,006 [main]: Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment] - at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:81)
DEBUG 18:20:45,007 [main]: Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null] - at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:103)
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [website.fedulov.Main] is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:372)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:332)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1066)
at website.fedulov.Main.main(Main.java:35)

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.