Spring boot 1.4.4 +BeetlSQL2.8 WARN o.s.c.a.ConfigurationClassPostProcessor [restartedMain]

没想好 发布于 2017/02/09 15:11
阅读 758
收藏 0

config:

@SpringBootApplication
public class WebConfig extends WebMvcConfigurerAdapter {


	/**
	 * beetl 模版引擎 模版
	 */
	@Bean(initMethod = "init", name = "beetlConfig")
	public BeetlGroupUtilConfiguration getBeetlGroupUtilConfiguration() {
		BeetlGroupUtilConfiguration beetlGroupUtilConfiguration = new BeetlGroupUtilConfiguration();
		ResourcePatternResolver patternResolver = ResourcePatternUtils.getResourcePatternResolver(new DefaultResourceLoader());
		try {
			String root = patternResolver.getResource("classpath:templates").getFile().toString();
			WebAppResourceLoader webAppResourceLoader = new WebAppResourceLoader(root);
			beetlGroupUtilConfiguration.setResourceLoader(webAppResourceLoader);

			beetlGroupUtilConfiguration.setConfigFileResource(patternResolver.getResource("classpath:beetl.properties"));
			// 自定义标签
			beetlGroupUtilConfiguration.setTagFactorys(new HashMap<String, TagFactory>() {
				private static final long serialVersionUID = 1L;
				{
					put("input", new TagFactory() {
						@Override
						public Tag createTag() {
							return new InputTag();
						}
					});
				}
			});
			return beetlGroupUtilConfiguration;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}

	}

	/**
	 * beetl 模版引擎 ViewResolver
	 */
	@Bean(name = "beetlViewResolver")
	public BeetlSpringViewResolver getBeetlSpringViewResolver(@Qualifier("beetlConfig") BeetlGroupUtilConfiguration beetlGroupUtilConfiguration) {
		BeetlSpringViewResolver beetlSpringViewResolver = new BeetlSpringViewResolver();
		beetlSpringViewResolver.setSuffix(".html");
		beetlSpringViewResolver.setContentType("text/html;charset=UTF-8");
		beetlSpringViewResolver.setOrder(0);
		beetlSpringViewResolver.setConfig(beetlGroupUtilConfiguration);
		return beetlSpringViewResolver;
	}

	/**
	 * beetlSql 扫描包. <br/>
	 *
	 * @date: 2017年1月12日 下午5:23:19
	 * @return
	 */
	@Bean(name = "beetlSqlScannerConfigurer")
	public BeetlSqlScannerConfigurer getBeetlSqlScannerConfigurer() {
		BeetlSqlScannerConfigurer conf = new BeetlSqlScannerConfigurer();
		conf.setBasePackage("com.xxx.dao");
		conf.setDaoSuffix("Dao");
		conf.setSqlManagerFactoryBeanName("sqlManagerFactoryBean");
		return conf;
	}

	/**
	 * 
	 * beetlSql 扫描SQL模版. <br/>
	 *
	 * @date: 2017年1月12日 下午5:23:54
	 * @param datasource
	 * @return
	 */
	@Bean(name = "sqlManagerFactoryBean")
	@Primary
	public SqlManagerFactoryBean getSqlManagerFactoryBean(@Qualifier("datasource") DataSource datasource) {
		SqlManagerFactoryBean factory = new SqlManagerFactoryBean();

		BeetlSqlDataSource source = new BeetlSqlDataSource();
		source.setMasterSource(datasource);
		factory.setCs(source);
		factory.setDbStyle(new MySqlStyle());
		factory.setInterceptors(new Interceptor[] { new DebugInterceptor() });
		factory.setNc(new UnderlinedNameConversion());
		factory.setSqlLoader(new ClasspathLoader("/sql"));
		return factory;
	}

	/**
	 * 数据库 配置. <br/>
	 *
	 * @date: 2017年1月12日 下午5:24:29
	 * @return
	 */
	@Bean(name = "datasource")
	public DataSource druidDataSource(Environment env) {
		DruidDataSource druidDataSource = new DruidDataSource();
		//....
		druidDataSource.setValidationQuery("SELECT 1 FROM DUAL");
		druidDataSource.setInitialSize(5);
		druidDataSource.setMaxActive(10);

		return druidDataSource;
	}

	/**
	 * 事物. <br/>
	 *
	 * @date: 2017年1月12日 下午5:24:54
	 * @param datasource
	 * @return
	 */
	@Bean(name = "txManager")
	public DataSourceTransactionManager getDataSourceTransactionManager(@Qualifier("datasource") DataSource datasource) {
		DataSourceTransactionManager dsm = new DataSourceTransactionManager();
		dsm.setDataSource(datasource);
		return dsm;
	}

}

异常:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.4.RELEASE)

2017-02-09 14:54:14,771 INFO o.s.b.StartupInfoLogger [restartedMain] Starting xxxprojectApplication on xxx-PC with PID 7160 (E:\workspace\xxxproject\xxxproject-web\target\classes started by YM10138 in E:\workspace\xxxproject\xxxproject-web)
2017-02-09 14:54:14,772 DEBUG o.s.b.StartupInfoLogger [restartedMain] Running with Spring Boot v1.4.4.RELEASE, Spring v4.3.6.RELEASE
2017-02-09 14:54:14,772 INFO o.s.b.SpringApplication [restartedMain] No active profile set, falling back to default profiles: default
2017-02-09 14:54:16,992 WARN o.s.c.a.ConfigurationClassPostProcessor [restartedMain] Cannot enhance @Configuration bean definition 'webConfig' since its singleton instance has been created too early. The typical cause is a non-static @Bean method with a BeanDefinitionRegistryPostProcessor return type: Consider declaring such methods as 'static'.
2017-02-09 14:54:17,285 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adminUserDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\admin\AdminUserDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,286 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsMaterialDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsMaterialDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,287 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,288 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductDetailDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductDetailDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,288 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductImgDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductImgDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,289 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductRuleDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductRuleDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,290 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductRuleDetailDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductRuleDetailDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,290 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsPropertyDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsPropertyDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,291 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsSupplierDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsSupplierDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,292 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsSupplierProductDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsSupplierProductDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,293 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'frontOrderDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\front\FrontOrderDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,293 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'frontUserDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\front\FrontUserDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,296 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adminUserDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\admin\AdminUserDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,296 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsMaterialDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsMaterialDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,297 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,297 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductDetailDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductDetailDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,298 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductImgDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductImgDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,298 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductRuleDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductRuleDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,299 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsProductRuleDetailDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsProductRuleDetailDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,299 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsPropertyDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsPropertyDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,300 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsSupplierDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsSupplierDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,300 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bsSupplierProductDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\bs\BsSupplierProductDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,300 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'frontOrderDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\front\FrontOrderDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:17,301 WARN o.s.b.f.s.AbstractBeanFactory [restartedMain] Bean creation exception on non-lazy FactoryBean type check: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'frontUserDao' defined in file [E:\workspace\xxxproject\xxxproject-dao\target\classes\com\xxxp\dao\front\FrontUserDao.class]: Cannot resolve reference to bean 'sqlManagerFactoryBean' while setting bean property 'sqlManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sqlManagerFactoryBean': Requested bean is currently in creation: Is there an unresolvable circular reference?
2017-02-09 14:54:19,603 INFO c.a.d.s.l.Log4j2Impl [restartedMain] {dataSource-1} inited
2017-02-09 14:54:20,103 INFO o.a.j.l.DirectJDKLog [restartedMain] Starting service Tomcat
2017-02-09 14:54:20,104 INFO o.a.j.l.DirectJDKLog [restartedMain] Starting Servlet Engine: Apache Tomcat/8.5.11
2017-02-09 14:54:20,170 INFO o.a.j.l.DirectJDKLog [localhost-startStop-1] Initializing Spring embedded WebApplicationContext
2017-02-09 14:54:22,141 WARN o.s.b.s.r.RedisStarterDeprecationWarningAutoConfiguration [restartedMain] spring-boot-starter-redis is deprecated as of Spring Boot 1.4, please migrate to spring-boot-starter-data-redis
2017-02-09 14:54:22,552 INFO o.s.b.StartupInfoLogger [restartedMain] Started xxxprojectApplication in 8.145 seconds (JVM running for 8.711)

每添加一个Dao多一个 WARN。。。

加载中
返回顶部
顶部