主题:关于springboot-plus 1.2.1 更新到1.3.1

厘米之外 2019年07月04日 174

1.2.1  com.ibeetl.admin.core.service.BaseService<T>

  @Autowired    protected SQLManager sqlManager;

1.3.1 com.ibeetl.admin.core.service.CoreBaseService<T>

 @Autowired @Qualifier("baseDataSourceSqlManagerFactoryBean")    protected SQLManager sqlManager;


运行的时候会报错:如下

***  Spring Boot 2 plus 

524  [restartedMain] INFO  com.ibeetl.admin.CosonleApplication logStarting 50 - Starting CosonleApplication on LIJU_DELL with PID 16784 (D:\eclipse-workpace-foreignAffairs4ccu\admin-console\target\classes started by li in D:\eclipse-workpace-foreignAffairs4ccu\admin-console)

527  [restartedMain] INFO  com.ibeetl.admin.CosonleApplication logStartupProfileInfo 675 - No active profile set, falling back to default profiles: default

562  [restartedMain] INFO  org.springframework.boot.devtools.env.DevToolsPropertyDefaultsPostProcessor logTo 227 - Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable

562  [restartedMain] INFO  org.springframework.boot.devtools.env.DevToolsPropertyDefaultsPostProcessor logTo 227 - For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'

2101 [restartedMain] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate multipleStoresDetected 244 - Multiple Spring Data modules found, entering strict repository configuration mode!

2104 [restartedMain] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate registerRepositoriesIn 126 - Bootstrapping Spring Data repositories in DEFAULT mode.

2145 [restartedMain] INFO  org.springframework.data.repository.config.RepositoryConfigurationDelegate registerRepositoriesIn 182 - Finished Spring Data repository scanning in 29ms. Found 0 repository interfaces.2565 [restartedMain] INFO  org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker postProcessAfterInitialization 330 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$48072297] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

3304 [restartedMain] INFO  org.springframework.boot.web.embedded.tomcat.TomcatWebServer initialize 90 - Tomcat initialized with port(s): 8090 (http)

3329 [restartedMain] INFO  org.apache.catalina.core.StandardService log 173 - Starting service [Tomcat]3329 [restartedMain] INFO  org.apache.catalina.core.StandardEngine log 173 - Starting Servlet engine: [Apache Tomcat/9.0.17]

3423 [restartedMain] INFO  org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/] log 173 - Initializing Spring embedded WebApplicationContext

3424 [restartedMain] INFO  org.springframework.web.context.ContextLoader prepareWebApplicationContext 296 - Root WebApplicationContext: initialization completed in 2862 ms

3835 [restartedMain] WARN  org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext refresh 557 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'auditConsoleService': Unsatisfied dependency expressed through field 'dictUtil'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'coreDictService': Unsatisfied dependency expressed through field 'sqlManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.beetl.sql.core.SQLManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=baseDataSourceSqlManagerFactoryBean)}

3850 [restartedMain] INFO  org.apache.catalina.core.StandardService log 173 - Stopping service [Tomcat]

3865 [restartedMain] INFO  org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener logMessage 142 - Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

3976 [restartedMain] ERROR org.springframework.boot.SpringApplication reportFailure 858 - Application run failedorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'auditConsoleService': Unsatisfied dependency expressed through field 'dictUtil'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'coreDictService': Unsatisfied dependency expressed through field 'sqlManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.beetl.sql.core.SQLManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=baseDataSourceSqlManagerFactoryBean)} at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) at com.ibeetl.admin.CosonleApplication.main(CosonleApplication.java:20) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'coreDictService': Unsatisfied dependency expressed through field 'sqlManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.beetl.sql.core.SQLManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=baseDataSourceSqlManagerFactoryBean)} at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1411) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ... 24 common frames omittedCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.beetl.sql.core.SQLManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=baseDataSourceSqlManagerFactoryBean)} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1654) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1213) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ... 37 common frames omitted

厘米之外 2019年07月04日

application配置

project.artifactId=@project.artifactId@ 

project.version=@project.version@ 

spring.datasource.url=jdbc:mysql://127.0.0.1:3306/foreignaffaris_plus?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false&useInformationSchema=true

spring.datasource.username=root 

spring.datasource.password=root#

spring.datasource.password=vCpXvFqYwySGbXGI 

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver#

spring.profiles.save-path = /opt/apache-tomcat-9.0.20/#spring.datasource.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl 

#spring.datasource.username=starter2 

#spring.datasource.password=starter2 

#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver 

 beetlsql.ds.dataSource.basePackage=com 

beetlsql.ds.dataSource.dbStyle=org.beetl.sql.core.db.MySqlStyle 

#有一个数据源命名为

dataSourcebeetlsql.mutiple.datasource=dataSource 

# 1,1 是管理员密码,相当于启动后就登录,方便测试,系统需要取消这俩个配置

 #user.id=1#user.orgId=1 

#打开审计功能,开发模式应该关闭

 audit.enable=false#单机情况下使用hashmap存放回话,集群下可以参考springboot 使用redisspring.session.store-type=redis spring.redis.host = 127.0.0.1#spring.redis.password = 5gDQO6Xc01jCdiIUx+ZMedQ1YTpf90WHyMeNk4h6OzZI8uUQ4b4MUYkVknkZ1gB+YGCbxBk2SLAqJmqNdonespring.redis.password = 123456spring.redis.port = 6379spring.redis.pool.max-active = 8#spring.cache.type=spring.cache.type=SIMPLElogging.level.root=infologging.level.org.springframework.web.servlet.mvc.method.annotation=warn#logging.file = my.logserver.port=8090#html视图交给beetl渲染beetl.suffix=htmlbeetlsql.dataSource.dbStyle=org.beetl.sql.core.db.MySqlStyle#beetlsql.basePackage=com.ibeetl,com.xxx.yourpackage 

beetlsql.basePackage=comapp.name=高校外事管理系统 

logging.pattern.console=%-4relative [%thread] %-5level %logger{256} %M %L - %msg%nspring.devtools.restart.exclude=static/**,templates/** 

#文档预览服务的调用地址,参考https://gitee.com/kekingcn/file-online-preview 安装,没有如下配置无法使用预览功能 

file.previewURL=http://preview.xxxxxx.com.cn:8080/onlinePreview#file.previewURL=http://localhost:8012/onlinePreview

 #默认支持文件上传. 

spring.http.multipart.enabled=false 

 #支持文件写入磁盘. 

spring.http.multipart.file-size-threshold=0 

 # 上传文件的临时目录 

#spring.http.multipart.location=/home/upload/ 

# 最大支持文件大小 

spring.http.multipart.max-file-size=4Mb  

# 最大支持请求大小 

spring.http.multipart.max-request-size=10Mb 

 #false不自动重启(建议:开发环境设置为true,生成环境设置为false) 

spring.devtools.restart.enabled=true

厘米之外 2019年07月04日

已经解决  ,更新配置文件