Skip to content

Commit

Permalink
Merge pull request #47 from cBioPortal/update_spring
Browse files Browse the repository at this point in the history
Update Spring Boot to 2.7.6
  • Loading branch information
inodb authored Jan 10, 2023
2 parents 703309a + aad9666 commit 4a35236
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COPY $PWD /session-service
WORKDIR /session-service
RUN mvn package -DskipTests -Dpackaging.type=jar

FROM openjdk:8-jre
FROM openjdk:11-jre-slim
# copy over target/session_service-x.y.z.jar ignore *-model.jar, that jar is
# used by cbioportal/cbioportal to import the models
COPY --from=build /session-service/target/*[0-9].jar /app.war
Expand Down
22 changes: 21 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.3.RELEASE</version>
<version>2.7.6</version>
</parent>
<profiles>
<profile>
Expand All @@ -37,6 +37,22 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -85,6 +101,10 @@
<artifactId>hibernate-validator</artifactId>
<version>6.0.13.Final</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.PropertySource;
import org.springframework.data.mongodb.core.mapping.event.ValidatingMongoEventListener;
import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
import org.springframework.context.annotation.Bean;
Expand All @@ -43,7 +44,8 @@
/**
* @author Manda Wilson
*/
@SpringBootApplication // shorthand for @Configuration, @EnableAutoConfiguration, @ComponentScan
@SpringBootApplication
@PropertySource(value = "classpath:system_settings_hidden_from_users.properties")
public class SessionService extends SpringBootServletInitializer {

@Bean
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
spring.mvc.pathmatch.matching-strategy=ant-path-matcher
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,22 @@
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.http.*;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
* @author Manda Wilson
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(webEnvironment=SpringBootTest.WebEnvironment.RANDOM_PORT, classes = SessionService.class, value= {"server.error.include-exception=true"})
@SpringBootTest(
classes = SessionService.class,
webEnvironment=SpringBootTest.WebEnvironment.RANDOM_PORT,
properties = {
"server.error.include-exception=true",
"spring.mongodb.embedded.version=3.5.5",
"spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER"
}
)
public class SessionServiceTest {

// get randomly assigned port
Expand All @@ -67,6 +76,7 @@ public void setUp() throws Exception {
template = new TestRestTemplate();
}


@After
public void tearDown() throws Exception {
// get all and delete them
Expand Down

0 comments on commit 4a35236

Please sign in to comment.