草庐IT

boot-args

全部标签

spring - 将已有的spring app迁移到spring-boot,手动配置spring-boot?

我有一个现有的spring3.1.4应用程序,它可以正常工作并且可以自行启动。我目前在我自己的主类中手动启动spring上下文。这不是spring-mvc应用程序,它不包含任何servlet、web.xml也不生成WAR。它只是为集成后端生成一个JAR。我想“包装”这个遗留应用程序并使用spring-boot启动它。但是,我无法弄清楚如何执行此操作,因为所有示例似乎都假设创建一个"new"应用程序。1)我有我现有的applicationContext.xml文件,其中包含我现有的Spring应用程序bean声明2)为了启动带有tomcat的spring-boot并将我现有的所有bean

spring - 将已有的spring app迁移到spring-boot,手动配置spring-boot?

我有一个现有的spring3.1.4应用程序,它可以正常工作并且可以自行启动。我目前在我自己的主类中手动启动spring上下文。这不是spring-mvc应用程序,它不包含任何servlet、web.xml也不生成WAR。它只是为集成后端生成一个JAR。我想“包装”这个遗留应用程序并使用spring-boot启动它。但是,我无法弄清楚如何执行此操作,因为所有示例似乎都假设创建一个"new"应用程序。1)我有我现有的applicationContext.xml文件,其中包含我现有的Spring应用程序bean声明2)为了启动带有tomcat的spring-boot并将我现有的所有bean

java - 如何启用执行器中的所有端点(Spring Boot 2.0.0 RC1)

我从1.5.10迁移到SpringBoot2.0.0RC1,但我被最新版本的执行器卡住了。如何启用公开和启用所有执行器端点?唯一暴露的端点是:{"_links":{"self":{"href":"http://127.0.0.1:8080/actuator","templated":false},"health":{"href":"http://127.0.0.1:8080/actuator/health","templated":false},"info":{"href":"http://127.0.0.1:8080/actuator/info","templated":false}

java - 如何启用执行器中的所有端点(Spring Boot 2.0.0 RC1)

我从1.5.10迁移到SpringBoot2.0.0RC1,但我被最新版本的执行器卡住了。如何启用公开和启用所有执行器端点?唯一暴露的端点是:{"_links":{"self":{"href":"http://127.0.0.1:8080/actuator","templated":false},"health":{"href":"http://127.0.0.1:8080/actuator/health","templated":false},"info":{"href":"http://127.0.0.1:8080/actuator/info","templated":false}

java - 更改 Spring Boot 使用的数据库模式

如何指定SpringBoot使用的数据库模式?我正在使用默认hibernate(=default)和postgres(但我希望有一个通用的解决方案)。我知道如何指定JDBCURL:spring.datasource.url=jdbc:postgresql:db_name但不幸的是,postgresql不允许在JDBCURL中指定模式。我知道有hibernate属性hibernate.default_schema,所以我希望以下属性之一可以工作:hibernate.default_schema=schemaspring.hibernate.default_schema=schemaspr

java - 更改 Spring Boot 使用的数据库模式

如何指定SpringBoot使用的数据库模式?我正在使用默认hibernate(=default)和postgres(但我希望有一个通用的解决方案)。我知道如何指定JDBCURL:spring.datasource.url=jdbc:postgresql:db_name但不幸的是,postgresql不允许在JDBCURL中指定模式。我知道有hibernate属性hibernate.default_schema,所以我希望以下属性之一可以工作:hibernate.default_schema=schemaspring.hibernate.default_schema=schemaspr

java - 在 Spring-boot 中设置默认 Activity 配置文件

如果未设置-Dspring.profiles.active,我希望我的默认Activity配置文件为production。我在application.properties中尝试了以下操作,但没有成功:spring.profiles.default=productionSpring-boot版本=1.3.5.RELEASE 最佳答案 您在这里所做的是将默认的default配置文件(如果您未指定@Profile注释,则在任何bean上使用的配置文件)为生产.你真正需要做的是设置默认的active配置文件,这样做是这样的:spring.p

java - 在 Spring-boot 中设置默认 Activity 配置文件

如果未设置-Dspring.profiles.active,我希望我的默认Activity配置文件为production。我在application.properties中尝试了以下操作,但没有成功:spring.profiles.default=productionSpring-boot版本=1.3.5.RELEASE 最佳答案 您在这里所做的是将默认的default配置文件(如果您未指定@Profile注释,则在任何bean上使用的配置文件)为生产.你真正需要做的是设置默认的active配置文件,这样做是这样的:spring.p

java - 在 Spring Boot 中增加 HTTP Post maxPostSize

我有一个相当简单的SpringBootWeb应用程序,我有一个带有enctype="multipart/form-data"的表单的HTML页面。我收到此错误:Themulti-partrequestcontainedparameterdata(excludinguploadedfiles)thatexceededthelimitformaxPostSizesetontheassociatedconnector.我正在使用SpringBoot的默认嵌入式tomcat服务器。显然,默认的maxPostSize值是2兆字节。有没有办法编辑这个值?通过application.properti

java - 在 Spring Boot 中增加 HTTP Post maxPostSize

我有一个相当简单的SpringBootWeb应用程序,我有一个带有enctype="multipart/form-data"的表单的HTML页面。我收到此错误:Themulti-partrequestcontainedparameterdata(excludinguploadedfiles)thatexceededthelimitformaxPostSizesetontheassociatedconnector.我正在使用SpringBoot的默认嵌入式tomcat服务器。显然,默认的maxPostSize值是2兆字节。有没有办法编辑这个值?通过application.properti