草庐IT

boot-args

全部标签

java - 有没有办法正确集成 spring-batch-admin 和 spring-boot ?

根据documentationspringbatchadmin很容易嵌入到现有的应用程序中。只需复制web.xml和index.jsp然后添加所需的依赖项就足以让它工作。但如果我想在现有的SpringBoot项目中使用它,情况会变得更糟。根据thisexample配置有点hacky,但它有效。直到我尝试在我的配置bean中使用@EnableBatchProcessing注释。然后我得到以下异常。Exceptioninthread"main"org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanw

java - 有没有办法正确集成 spring-batch-admin 和 spring-boot ?

根据documentationspringbatchadmin很容易嵌入到现有的应用程序中。只需复制web.xml和index.jsp然后添加所需的依赖项就足以让它工作。但如果我想在现有的SpringBoot项目中使用它,情况会变得更糟。根据thisexample配置有点hacky,但它有效。直到我尝试在我的配置bean中使用@EnableBatchProcessing注释。然后我得到以下异常。Exceptioninthread"main"org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanw

Java Spring Boot 测试 : How to exclude java configuration class from test context

我有一个带有SpringBoot的JavaWeb应用程序运行测试时我需要排除一些Java配置文件:测试配置(测试运行时需要包含):@TestConfiguration@PropertySource("classpath:otp-test.properties")publicclassTestOTPConfig{}生产配置(测试运行时需要排除):@Configuration@PropertySource("classpath:otp.properties")publicclassOTPConfig{}测试类(带有显式配置类):@RunWith(SpringRunner.class)@Sp

Java Spring Boot 测试 : How to exclude java configuration class from test context

我有一个带有SpringBoot的JavaWeb应用程序运行测试时我需要排除一些Java配置文件:测试配置(测试运行时需要包含):@TestConfiguration@PropertySource("classpath:otp-test.properties")publicclassTestOTPConfig{}生产配置(测试运行时需要排除):@Configuration@PropertySource("classpath:otp.properties")publicclassOTPConfig{}测试类(带有显式配置类):@RunWith(SpringRunner.class)@Sp

java - Gradle 无法解析 org.springframework.boot :spring-boot-gradle-plugin:1. 4.2.RELEASE (repo1.maven.org: Nome o servizio sconosciuto)

我在Jenkins上运行gradle构建时遇到问题:Gradle版本是https://services.gradle.org/distributions/gradle-2.14.1-bin.zipFAILURE:Buildfailedwithanexception.*Whatwentwrong:Aproblemoccurredconfiguringrootproject'myApp'.>Couldnotresolvealldependenciesforconfiguration':classpath'.>Couldnotresolveorg.springframework.boot:s

java - Gradle 无法解析 org.springframework.boot :spring-boot-gradle-plugin:1. 4.2.RELEASE (repo1.maven.org: Nome o servizio sconosciuto)

我在Jenkins上运行gradle构建时遇到问题:Gradle版本是https://services.gradle.org/distributions/gradle-2.14.1-bin.zipFAILURE:Buildfailedwithanexception.*Whatwentwrong:Aproblemoccurredconfiguringrootproject'myApp'.>Couldnotresolvealldependenciesforconfiguration':classpath'.>Couldnotresolveorg.springframework.boot:s

java - 如何防止嵌入式netty服务器从spring-boot-starter-webflux启动?

我想使用Springs新的响应式webflux扩展在客户端和服务器应用程序之间建立通信。对于依赖管理,我使用gradle。我在服务器端以及客户端的build.gradle文件基本上是:buildscript{repositories{mavenCentral()maven{url"https://repo.spring.io/snapshot"}}dependencies{classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.0.BUILD-SNAPSHOT")}}repositories{mavenCent

java - 如何防止嵌入式netty服务器从spring-boot-starter-webflux启动?

我想使用Springs新的响应式webflux扩展在客户端和服务器应用程序之间建立通信。对于依赖管理,我使用gradle。我在服务器端以及客户端的build.gradle文件基本上是:buildscript{repositories{mavenCentral()maven{url"https://repo.spring.io/snapshot"}}dependencies{classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.0.BUILD-SNAPSHOT")}}repositories{mavenCent

spring - 从 Spring Boot 应用程序访问 SessionFactory

我正在尝试访问Hibernatesession工厂,但在提到的行出现以下错误。NoCurrentSessionContextconfigured!代码@Service@TransactionalpublicclassGenericSearchImplimplementsGenericSearch{@AutowiredprivateEntityManagerFactoryentityManagerFactory;@Override@SuppressWarnings("unchecked")publicListsearch(finalClasstype,finalString[]crite

spring - 从 Spring Boot 应用程序访问 SessionFactory

我正在尝试访问Hibernatesession工厂,但在提到的行出现以下错误。NoCurrentSessionContextconfigured!代码@Service@TransactionalpublicclassGenericSearchImplimplementsGenericSearch{@AutowiredprivateEntityManagerFactoryentityManagerFactory;@Override@SuppressWarnings("unchecked")publicListsearch(finalClasstype,finalString[]crite