DEBUG [main] - Searching for key 'db.driver' in [environmentProperties] DEBUG [main] - Searching for key 'db.driver' in [systemProperties] DEBUG [main] - Searching for key 'db.driver' in [systemEnviro

INFO [main] - Loading properties file from class path resource [db.properties]
DEBUG [main] - Adding [localProperties] PropertySource with lowest search precedence
DEBUG [main] - Searching for key 'db.driver' in [environmentProperties]
DEBUG [main] - Searching for key 'db.driver' in [systemProperties]
DEBUG [main] - Searching for key 'db.driver' in [systemEnvironment]
DEBUG [main] - Could not find key 'db.driver' in any property source. Returning [null]
DEBUG [main] - Searching for key 'db.driver' in [localProperties]
DEBUG [main] - Found key 'db.driver' in [localProperties] with type [String] and value 'com.mysql.jdbc.Driver'
DEBUG [main] - Searching for key 'db.username' in [environmentProperties]
DEBUG [main] - Searching for key 'db.username' in [systemProperties]
DEBUG [main] - Searching for key 'db.username' in [systemEnvironment]
DEBUG [main] - Could not find key 'db.username' in any property source. Returning [null]
DEBUG [main] - Searching for key 'db.username' in [localProperties]
DEBUG [main] - Found key 'db.username' in [localProperties] with type [String] and value 'root'
DEBUG [main] - Searching for key 'db.password' in [environmentProperties]
DEBUG [main] - Searching for key 'db.password' in [systemProperties]
DEBUG [main] - Searching for key 'db.password' in [systemEnvironment]
DEBUG [main] - Could not find key 'db.password' in any property source. Returning [null]
DEBUG [main] - Searching for key 'db.password' in [localProperties]
DEBUG [main] - Found key 'db.password' in [localProperties] with type [String] and value '123456'
DEBUG [main] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@7a30d1e6]
DEBUG [main] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@1d371b2d]
DEBUG [main] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5bc79255: defining beans [org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,sqlSessionFactory,userDao]; root of factory hierarchy
DEBUG [main] - Returning cached instance of singleton bean 'org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0'
DEBUG [main] - Creating shared instance of singleton bean 'dataSource'
DEBUG [main] - Creating instance of bean 'dataSource'
DEBUG [main] - Eagerly caching bean 'dataSource' to allow for resolving potential circular references
DEBUG [main] - Finished creating instance of bean 'dataSource'
DEBUG [main] - Creating shared instance of singleton bean 'sqlSessionFactory'
DEBUG [main] - Creating instance of bean 'sqlSessionFactory'
DEBUG [main] - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
DEBUG [main] - Eagerly caching bean 'sqlSessionFactory' to allow for resolving potential circular references
DEBUG [main] - Returning cached instance of singleton bean 'dataSource'
DEBUG [main] - Invoking afterPropertiesSet() on bean with name 'sqlSessionFactory'
DEBUG [main] - Class not found: org.jboss.vfs.VFS
DEBUG [main] - JBoss 6 VFS API is not available in this environment.
DEBUG [main] - Class not found: org.jboss.vfs.VirtualFile
DEBUG [main] - VFS implementation org.apache.ibatis.io.JBoss6VFS is not valid in this environment.
DEBUG [main] - Using VFS adapter org.apache.ibatis.io.DefaultVFS
DEBUG [main] - Find JAR URL: file:/D:/workspace/mybatis/bin/com/glh/ms/po
DEBUG [main] - Not a JAR: file:/D:/workspace/mybatis/bin/com/glh/ms/po
DEBUG [main] - Reader entry: User.class
DEBUG [main] - Listing file:/D:/workspace/mybatis/bin/com/glh/ms/po
DEBUG [main] - Find JAR URL: file:/D:/workspace/mybatis/bin/com/glh/ms/po/User.class
DEBUG [main] - Not a JAR: file:/D:/workspace/mybatis/bin/com/glh/ms/po/User.class
DEBUG [main] - Reader entry: 漱壕

控制台报错,貌似是找不到db.properties,一开始以为是db.properties路径没写对,仔细检查后发现 applicationContext.xml 有个如下value没匹配,修改后测试成功。。。

 

猜你喜欢

转载自www.cnblogs.com/gelh/p/10570603.html
今日推荐