java classpath 遍历_java - 在类路径上找不到javax.persistence.Persistence。 假设非JPA 2环境。 默认情况下,所有属性都是可遍历的。 春季...

我正在开发spring-cloud-boot-admin示例。 在此示例中,我什么也没做,但是项目仍然无法运行。 如果我将spring-boot-starter-parent降低到1.5.4.RELEASE那么它将起作用。 但是,如果我使用最新版本,为什么会失败? 最新版本2.0.1.RELEASE 。

17:07:21.066 [background-preinit] DEBUG org.jboss.logging - Logging Provider: org.jboss.logging.Log4j2LoggerProvider

17:07:21.087 [background-preinit] INFO org.hibernate.validator.internal.util.Version - HV000001: Hibernate Validator 6.0.9.Final

17:07:21.089 [background-preinit] DEBUG org.hibernate.validator.internal.engine.resolver.TraversableResolvers - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.

17:07:21.105 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ValidationXmlParser - Trying to load META-INF/validation.xml for XML based Validator configuration.

17:07:21.107 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ResourceLoaderHelper - Trying to load META-INF/validation.xml via TCCL

17:07:21.108 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ResourceLoaderHelper - Trying to load META-INF/validation.xml via Hibernate Validator's class loader

17:07:21.108 [background-preinit] DEBUG org.hibernate.validator.internal.xml.ValidationXmlParser - No META-INF/validation.xml found. Using annotation based configuration only.

17:07:21.292 [background-preinit] DEBUG org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator - Loaded expression factory via original TCCL

17:07:21.292 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator as ValidatorFactory-scoped message interpolator.

17:07:21.292 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.resolver.TraverseAllTraversableResolver as ValidatorFactory-scoped traversable resolver.

17:07:21.292 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.util.ExecutableParameterNameProvider as ValidatorFactory-scoped parameter name provider.

17:07:21.292 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.DefaultClockProvider as ValidatorFactory-scoped clock provider.

17:07:21.292 [background-preinit] DEBUG org.hibernate.validator.internal.engine.ValidatorFactoryImpl - HV000234: Using org.hibernate.validator.internal.engine.scripting.DefaultScriptEvaluatorFactory as ValidatorFactory-scoped script evaluator factory.

SpringBootAdminApplication

@EnableAdminServer

@Configuration

@SpringBootApplication

public class SpringBootAdminApplication {

public static void main(String[] args) {

SpringApplication.run(SpringBootAdminApplication.class, args);

}

@Configuration

public static class SecurityConfig extends WebSecurityConfigurerAdapter {

@Override

protected void configure(HttpSecurity http) throws Exception {

http.formLogin().loginPage("/login.html").loginProcessingUrl("/login").permitAll();

http.logout().logoutUrl("/logout");

http.csrf().disable();

http.authorizeRequests().antMatchers("/login.html", "/**/*.css", "/img/**", "/third-party/**").permitAll();

http.authorizeRequests().antMatchers("/**").authenticated();

http.httpBasic();

}

}

}

application.properties

spring.application.name=Boot-Admin

server.port=8093

management.security.enabled=false

security.user.name=admin

security.user.password=admin

pom.xml

org.springframework.boot

spring-boot-starter-parent

2.0.1.RELEASE

UTF-8

UTF-8

1.8

de.codecentric

spring-boot-admin-server-ui-login

1.5.1

de.codecentric

spring-boot-admin-server

1.5.1

de.codecentric

spring-boot-admin-server-ui

1.5.1

org.springframework.boot

spring-boot-starter

org.springframework.boot

spring-boot-starter-security

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值