当前位置: 首页 > news >正文

总算把网站设计好了广州免费孕检

总算把网站设计好了,广州免费孕检,非常好听的贸易公司名称大全,区块链开发与应用专业how2java今天#xff0c;我将我当前正在从事的项目之一迁移到了Spring 4.0。 由于它是我用来学习和演示Spring功能的非常简单的Web应用程序#xff0c;因此只需要更新项目的POM文件并更改Spring版本。 我将项目部署到Tomcat 7服务器#xff0c;显然该应用程序未启动。 我在I… how2java 今天我将我当前正在从事的项目之一迁移到了Spring 4.0。 由于它是我用来学习和演示Spring功能的非常简单的Web应用程序因此只需要更新项目的POM文件并更改Spring版本。 我将项目部署到Tomcat 7服务器显然该应用程序未启动。 我在IntelliJ控制台中看到此消息 Failed to load bean class: pl.codeleak.t.config.RootConfig; nested exception is org.springframework.core.NestedIOException: Unable to collect imports; nested exception is java.lang.ClassNotFoundException: java.lang.annotation.Repeatable Failed to load bean class: pl.codeleak.t.config.RootConfig; nested exception is org.springframework.core.NestedIOException: Unable to collect imports; nested exception is java.lang.ClassNotFoundException: java.lang.annotation.Repeatable Failed to load bean class: pl.codeleak.t.config.RootConfig; nested exception is org.springframework.core.NestedIOException: Unable to collect imports; nested exception is java.lang.ClassNotFoundException: java.lang.annotation.Repeatable 。 什么…… java.lang.annotation.Repeatable注释是用于标记您的注释以便在Java 8中多次使用的元注释但我在项目中使用Java 7。 例如 Repeatable(Schedules.class) public interface Schedule { ... }Schedule(dayOfMonthlast) Schedule(dayOfWeekFri, hour23) public void doPeriodicCleanup() { ... } 此处对此进行了很好的描述 http : //docs.oracle.com/javase/tutorial/java/annotations/repeating.html 。 Spring 4在其PropertySource批注中利用了此功能。 提醒您 PropertySource批注提供了一种将名称/值属性对的源添加到Springs Environment的机制 它与Configuration类结合使用。 您可能已经知道我正在自己的配置中使用此功能 Configuration PropertySource(classpath:/datasource.properties) public class DefaultDataSourceConfig implements DataSourceConfig {Autowiredprivate Environment env;OverrideBeanpublic DataSource dataSource() {DriverManagerDataSource dataSource new DriverManagerDataSource();dataSource.setDriverClassName(env.getRequiredProperty(dataSource.driverClassName));dataSource.setUrl(env.getRequiredProperty(dataSource.url));dataSource.setUsername(env.getRequiredProperty(dataSource.username));dataSource.setPassword(env.getRequiredProperty(dataSource.password));return dataSource;} } 我首先想到的是Spring不再与低于8的Java兼容。 不可能。 虽然这样做GitHub上查找我发现了一个全新的PropertySources注释是一个容器PropertySource注解。 那就是我针对Java兼容性问题的解决方案在我的配置类上使用PropertySources注释如下所示 Configuration PropertySources(value {PropertySource(classpath:/datasource.properties)}) public class DefaultDataSourceConfig implements DataSourceConfig {Autowiredprivate Environment env;} 就是这样 进行此更改后我的应用程序开始运行并且可以正常运行 编辑 请参阅 https //jira.springsource.org/browse/SPR-11086 参考操作方法在Springle 4中我们的JCG合作伙伴 Rafal Borowiec的PropertySource注释与Java 7一起在Codeleak.pl博客上使用。 翻译自: https://www.javacodegeeks.com/2013/11/how-to-using-propertysource-annotation-in-spring-4-with-java-7.htmlhow2java
http://www.pierceye.com/news/735547/

相关文章:

  • 提高网站性能网站建设中源代码
  • 海珠营销型网站建设公司山东城建建设职业学院教务网站
  • 怎样用虚拟主机建网站温州购物网络商城网站设计制作
  • 站外seo推广游戏模板 wordpress
  • 做翻译网站 知乎怎么制作网站主题
  • 照片书那个网站做的好重庆网站建设价格费用
  • 网站两侧广告石家庄建设
  • 网站设计的企业网站建设教程txt
  • 大型建站公司seo查询5118
  • 百度站长提交工具中小企业建站模板
  • 企业网站西安seo服务
  • 做网站需要多少个人网站logo设计
  • 新浪云 建设网站中企动力双语网站
  • 网站建设中心网站开发前端工程师
  • 网站目录结构设计应注意的问题课程平台网站建设报价
  • 南京网站排名优化费用做网站大作业的心得体会
  • 网站 三合一高端的响应式网站建设公司
  • 网站设计公司天津网站备案不关站
  • 怎样增加网站会员量微信商城怎么进入
  • 网站建设目的功能行业门户网站源码
  • 建设网站收费标准100m做电影网站
  • 怎么样自己做最简单的网站wordpress酷黑主题
  • 长沙市建设网站网站修改域名
  • 邢台企业做网站价格如何做网络推广运营
  • 番禺网站建设服务百度广告推广价格
  • 什么系统做网站最安全网络科技网站设计
  • 通州网站建设是什么查看网站开发商
  • 建设网站公司浩森宇特怎么推广公司网站
  • 来宾住房和城乡建设网站变装第三性wordpress
  • 自己开发网站怎么开发站长工具网址是多少