spring-boot 相关问题

Spring Boot可以轻松创建Spring驱动的生产级应用程序和服务,并且可以轻松实现。它采用了Spring平台的观点,以便新用户和现有用户可以快速获得他们需要的位。

属性文件的方式。所以我的代码看起来像这样:

这似乎是正确的,因为,如果我删除(或重命名)

回答 0 投票 0

当运行包装作为可执行文件(EXE)

. ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.4.2) 2025-02-13T21:53:15.250+09:00 INFO 9960 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Starting application using Java 22.0.1 with PID 9960 (started by tako21osan in C:\Users\tako21osan\Desktop\250205\myapp\myapp\myapp\MyApp) 2025-02-13T21:53:15.253+09:00 INFO 9960 --- [JavaFX-Launcher] o.s.boot.SpringApplication : No active profile set, falling back to 1 default profile: "default" 2025-02-13T21:53:15.694+09:00 WARN 9960 --- [JavaFX-Launcher] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [test.myapp.MyApp]: Could not evaluate condition on org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$PooledDataSourceConfiguration due to javax/naming/NamingException not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake) 2025-02-13T21:53:15.703+09:00 INFO 9960 --- [JavaFX-Launcher] .s.b.a.l.ConditionEvaluationReportLogger : Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2025-02-13T21:53:15.720+09:00 ERROR 9960 --- [JavaFX-Launcher] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [test.myapp.MyApp]: Could not evaluate condition on org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$PooledDataSourceConfiguration due to javax/naming/NamingException not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake) at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:613) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.lambda$processGroupImports$1(ConfigurationClassParser.java:836) ~[spring-context-6.2.2.jar:6.2.2] at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:833) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:803) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:189) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:418) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:290) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:791) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:609) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.4.2.jar:3.4.2] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.4.2.jar:3.4.2] at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.4.2.jar:3.4.2] at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:149) ~[spring-boot-3.4.2.jar:3.4.2] at test.myapp.MyApp.init(MyApp.java:22) ~[myapp-1.0-SNAPSHOT.jar:1.0-SNAPSHOT] at [email protected]/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:817) ~[javafx.graphics:na] at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196) ~[javafx.graphics:na] at java.base/java.lang.Thread.run(Thread.java:1570) ~[na:na] Caused by: java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$PooledDataSourceConfiguration due to javax/naming/NamingException not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake) at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:54) ~[spring-boot-autoconfigure-3.4.2.jar:3.4.2] at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:99) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:233) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassParser.processMemberClasses(ConfigurationClassParser.java:413) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:294) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:267) ~[spring-context-6.2.2.jar:6.2.2] at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:603) ~[spring-context-6.2.2.jar:6.2.2] ... 19 common frames omitted Caused by: java.lang.NoClassDefFoundError: javax/naming/NamingException at org.springframework.boot.jdbc.DataSourceBuilder$HikariDataSourceProperties.<init>(DataSourceBuilder.java:611) ~[spring-boot-3.4.2.jar:3.4.2] at org.springframework.boot.jdbc.DataSourceBuilder$MappedDataSourceProperties.lookup(DataSourceBuilder.java:439) ~[spring-boot-3.4.2.jar:3.4.2] at org.springframework.boot.jdbc.DataSourceBuilder$MappedDataSourceProperties.lookupPooled(DataSourceBuilder.java:405) ~[spring-boot-3.4.2.jar:3.4.2] at org.springframework.boot.jdbc.DataSourceBuilder$MappedDataSourceProperties.forType(DataSourceBuilder.java:395) ~[spring-boot-3.4.2.jar:3.4.2] at org.springframework.boot.jdbc.DataSourceBuilder.findType(DataSourceBuilder.java:267) ~[spring-boot-3.4.2.jar:3.4.2] at org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration$PooledDataSourceAvailableCondition.getMatchOutcome(DataSourceAutoConfiguration.java:118) ~[spring-boot-autoconfigure-3.4.2.jar:3.4.2] at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberOutcomes.getConditionOutcome(AbstractNestedCondition.java:195) ~[spring-boot-autoconfigure-3.4.2.jar:3.4.2] at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberOutcomes.<init>(AbstractNestedCondition.java:189) ~[spring-boot-autoconfigure-3.4.2.jar:3.4.2] at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberConditions.lambda$getMatchOutcomes$0(AbstractNestedCondition.java:169) ~[spring-boot-autoconfigure-3.4.2.jar:3.4.2] at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:986) ~[na:na] at org.springframework.util.MultiValueMapAdapter.forEach(MultiValueMapAdapter.java:179) ~[spring-core-6.2.2.jar:6.2.2] at java.base/java.util.Collections$UnmodifiableMap.forEach(Collections.java:1708) ~[na:na] at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberConditions.getMatchOutcomes(AbstractNestedCondition.java:169) ~[spring-boot-autoconfigure-3.4.2.jar:3.4.2] at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition$MemberMatchOutcomes.<init>(AbstractNestedCondition.java:78) ~[spring-boot-autoconfigure-3.4.2.jar:3.4.2] at org.springframework.boot.autoconfigure.condition.AbstractNestedCondition.getMatchOutcome(AbstractNestedCondition.java:63) ~[spring-boot-autoconfigure-3.4.2.jar:3.4.2] at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-3.4.2.jar:3.4.2] ... 25 common frames omitted Caused by: java.lang.ClassNotFoundException: javax.naming.NamingException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[na:na] ... 41 common frames omitted

回答 0 投票 0




回答 0 投票 0

有一些方法可以在spring boot中捕获和记录thfk thfka listers和@schedul的方法吗?

默认异常在Spring Boot中抛出3.4 REST控制器已记录在调度程序中。这些也可以通过@ControllerAdvice进行自定义,甚至可以在Servlet过滤器中登录。 但是,如果是

回答 1 投票 0



重新包装Spring BootJar

我需要将静态UI文件注入现有的弹簧启动可执行JAR。 为此,我将罐子作为依赖性拉动,然后使用Maven Antrun插件来: 用温度弄清罐子 添加一个

回答 2 投票 0



@IntegrationComponentscan注释无法扫描@MessageGateway组件

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.sz</groupId> <artifactId>sz-common</artifactId> <version>${revision}</version> </parent> <artifactId>sz-common-mqtt</artifactId> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-integration</artifactId> </dependency> <dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-mqtt</artifactId> </dependency> <dependency> <groupId>org.eclipse.paho</groupId> <artifactId>org.eclipse.paho.mqttv5.client</artifactId> </dependency> </dependencies> </project>

回答 1 投票 0

如何修复 - > java.lang.reflect.InaccessibleObjectException:无法制作场静态最终booleanjava.io.filesystem.usecanoncaches

I更新了Tomcat Embed-core 11.0.2至11.0.3-之后,我要低于问题。而且Spring Boot Spectaiton不会出现。 我正在使用JDK 17.0.8.0.7-1.win.x86_64和spring-boot-starter-parent ...

回答 1 投票 0

localhost:5173

回答 0 投票 0

有可能在Springboot Spring Actuator Health Dendpoint中停用Mongohealtheadeator?

在我从事的Springboot项目中,对Spring-Data-MongoDB有一种及时的Maven依赖性。因此,尽管项目d ...

回答 3 投票 0



复杂对象列表get映射

我有一个简单的@getMapping如下: @getMapping publicPage搜索(Pagable -Pagable,List<@Valid FilterCriterion>过滤器){ 返回page.empty(); } 过滤器信用...

回答 1 投票 0


最新问题
© www.soinside.com 2019 - 2025. All rights reserved.