Merge pull request #27 from eugenp/master

update
This commit is contained in:
Maiklins 2020-01-28 21:56:11 +01:00 committed by GitHub
commit dbbaecf5a1
29 changed files with 1341 additions and 60 deletions

View File

@ -4,6 +4,7 @@ import org.junit.Test;
import java.time.OffsetDateTime;
import java.util.Date;
import java.util.TimeZone;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@ -18,12 +19,19 @@ public class ConvertToOffsetDateTimeUnitTest {
@Test
public void givenDate_whenHasOffset_thenConvertWithOffset() {
TimeZone prevTimezone = TimeZone.getDefault();
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
Date date = new Date();
date.setHours(6);
date.setMinutes(30);
OffsetDateTime odt = ConvertToOffsetDateTime.convert(date, 3, 30);
assertEquals(10, odt.getHour());
assertEquals(0, odt.getMinute());
// Reset the timezone to its original value to prevent side effects
TimeZone.setDefault(prevTimezone);
}
}

View File

@ -642,7 +642,6 @@
<module>spring-boot-modules</module>
<module>spring-boot-admin</module>
<module>spring-boot-angular</module>
<module>spring-boot-artifacts</module>
<module>spring-boot-autoconfiguration</module>
<module>spring-boot-bootstrap</module>
<module>spring-boot-camel</module>
@ -653,7 +652,6 @@
<module>spring-boot-ctx-fluent</module>
<module>spring-boot-custom-starter</module>
<module>spring-boot-deployment</module>
<module>spring-boot-di</module>
<module>spring-boot-environment</module>
<module>spring-boot-flowable</module>
<!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project -->
@ -1177,7 +1175,6 @@
<module>spring-boot-modules</module>
<module>spring-boot-admin</module>
<module>spring-boot-angular</module>
<module>spring-boot-artifacts</module>
<module>spring-boot-autoconfiguration</module>
<module>spring-boot-bootstrap</module>
<module>spring-boot-camel</module>
@ -1188,7 +1185,6 @@
<module>spring-boot-ctx-fluent</module>
<module>spring-boot-custom-starter</module>
<module>spring-boot-deployment</module>
<module>spring-boot-di</module>
<module>spring-boot-environment</module>
<module>spring-boot-flowable</module>
<!-- <module>spring-boot-gradle</module> --> <!-- Not a maven project -->

View File

@ -14,7 +14,9 @@
</parent>
<modules>
<module>spring-boot-artifacts</module>
<module>spring-boot-data</module>
<module>spring-boot-di</module>
<module>spring-boot-mvc-birt</module>
<module>spring-boot-properties</module>
<module>spring-boot-testing</module>

View File

@ -11,7 +11,7 @@
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath>
<relativePath>../../parent-boot-2</relativePath>
</parent>
<dependencies>

View File

@ -12,7 +12,7 @@
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath>
<relativePath>../../parent-boot-2</relativePath>
</parent>
<dependencies>

View File

@ -30,7 +30,7 @@
<module>spring-security-mvc-persisted-remember-me</module>
<module>spring-security-mvc-socket</module>
<module>spring-security-oidc</module>
<!--<module>spring-security-react</module> --> <!-- Module broken, fixing in BAEL-20772 -->
<module>spring-security-react</module>
<module>spring-security-rest</module>
<module>spring-security-rest-basic-auth</module>

View File

@ -6,8 +6,10 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration(classes = { MvcConfig.class, SecSecurityConfig.class })
public class SpringContextTest {