BAEL-2493

This commit is contained in:
Krzysztof Majewski 2019-04-18 10:03:19 +02:00
parent ce418d10ca
commit a249fbaf62
8 changed files with 244 additions and 118 deletions

View File

@ -617,6 +617,7 @@
<module>spring-boot-camel</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->
<module>spring-boot-client</module>
<module>spring-boot-configuration</module>
<module>spring-boot-crud</module>
<module>spring-boot-ctx-fluent</module>
<module>spring-boot-custom-starter</module>
@ -817,6 +818,7 @@
<module>spring-boot-bootstrap</module>
<module>spring-boot-camel</module>
<module>spring-boot-client</module>
<module>spring-boot-configuration</module>
<module>spring-boot-custom-starter</module>
<module>greeter-spring-boot-autoconfigure</module>
<module>greeter-spring-boot-sample-app</module>
@ -1269,6 +1271,7 @@
<module>spring-boot-camel</module>
<!-- <module>spring-boot-cli</module> --> <!-- Not a maven project -->
<module>spring-boot-client</module>
<module>spring-boot-configuration</module>
<module>spring-boot-crud</module>
<module>spring-boot-ctx-fluent</module>
<module>spring-boot-custom-starter</module>

29
spring-boot-configuration/.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
HELP.md
/target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
/build/
### VS Code ###
.vscode/

View File

View File

@ -0,0 +1,41 @@
<?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>
<artifactId>parent-boot-2</artifactId>
<groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath>
</parent>
<groupId>com.baeldung</groupId>
<artifactId>spring-boot-configuration</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>spring-boot-configuration</name>
<description>Demo project for Spring Boot configuration</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,13 @@
package com.baeldung.springbootconfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringBootConfigurationApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootConfigurationApplication.class, args);
}
}

View File

@ -0,0 +1,23 @@
# server configuration
server.port=80
server.address=127.0.0.1
## Error handling configuration
server.error.whitelabel.enabled=true
server.error.path=/user-error
server.error.include-exception=true
server.error.include-stacktrace=always
## Server connections configuration
server.tomcat.max-threads=200
server.connection-timeout=5s
server.max-http-header-size=8KB
server.tomcat.max-swallow-size=2MB
server.tomcat.max-http-post-size=2MB
## Access logs configuration
server.tomcat.accesslog.enabled=true
server.tomcat.accesslog.directory=logs
server.tomcat.accesslog.file-date-format=yyyy-MM-dd
server.tomcat.accesslog.prefix=access_log
server.tomcat.accesslog.suffix=.log

View File

@ -0,0 +1,16 @@
package com.baeldung.springbootconfiguration;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class SpringContextIntegrationTest {
@Test
public void contextLoads() {
}
}