Skip to content

Commit

Permalink
fixup! crnk-setup-spring-boot3 and remove 1 and 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Thorpe committed Oct 4, 2023
1 parent 9bb3165 commit 5aebf74
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 35 deletions.
13 changes: 6 additions & 7 deletions crnk-setup/crnk-setup-spring-boot3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ dependencies {
compileOnly 'io.opentracing:opentracing-api:0.31.0'

compileOnly 'org.hibernate:hibernate-core-jakarta:5.6.15.Final'
compileOnly 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.springframework.boot:spring-boot-configuration-processor'
compileOnly 'org.springframework.boot:spring-boot-starter-actuator'
compileOnly 'org.springframework.boot:spring-boot-starter-validation'
compileOnly 'org.springframework.security:spring-security-core'

compileOnly 'org.springframework:spring-orm'
compileOnlyApi 'org.springframework.boot:spring-boot-starter-web'
compileOnlyApi 'org.springframework.boot:spring-boot-configuration-processor'
compileOnlyApi 'org.springframework.boot:spring-boot-starter-actuator'
compileOnlyApi 'org.springframework.boot:spring-boot-starter-validation'
compileOnlyApi 'org.springframework.security:spring-security-core'
compileOnlyApi 'org.springframework:spring-orm'

testImplementation project(':crnk-data:crnk-data-jpa')
testImplementation project(':crnk-validation')
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
io.crnk.spring.setup.boot.home.CrnkHomeAutoConfiguration
io.crnk.spring.setup.boot.core.CrnkCoreAutoConfiguration
io.crnk.spring.setup.boot.core.CrnkTomcatAutoConfiguration
io.crnk.spring.setup.boot.jpa.CrnkJpaAutoConfiguration
io.crnk.spring.setup.boot.meta.CrnkMetaAutoConfiguration
io.crnk.spring.setup.boot.operations.CrnkOperationsAutoConfiguration
io.crnk.spring.setup.boot.ui.CrnkUIAutoConfiguration
io.crnk.spring.setup.boot.security.CrnkSecurityAutoConfiguration
io.crnk.spring.setup.boot.security.CrnkSpringSecurityAutoConfiguration
io.crnk.spring.setup.boot.mvc.CrnkSpringMvcAutoConfiguration
io.crnk.spring.setup.boot.monitor.CrnkSpringOpenTracingAutoConfiguration
io.crnk.spring.setup.boot.mvc.CrnkErrorControllerAutoConfiguration
io.crnk.spring.setup.boot.data.facet.CrnkFacetAutoConfiguration
io.crnk.spring.setup.boot.format.PlainJsonFormatAutoConfiguration
io.crnk.spring.setup.boot.validation.CrnkValidationAutoConfiguration
io.crnk.spring.setup.boot.monitor.CrnkSpringActuatorMetricsAutoConfiguration
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
@RestController
@EnableAutoConfiguration
@Import({CrnkCoreAutoConfiguration.class, CrnkJpaAutoConfiguration.class, ModuleConfig.class})
public class BasicSpringBoot2Application {
public class BasicSpringBoot3Application {

public static void main(String[] args) {
SpringApplication.run(BasicSpringBoot2Application.class, args);
SpringApplication.run(BasicSpringBoot3Application.class, args);
}

@RequestMapping("/api/custom")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import io.crnk.data.facet.FacetResource;
import io.crnk.data.jpa.JpaModuleConfig;
import io.crnk.meta.MetaModuleConfig;
import io.crnk.spring.app.BasicSpringBoot2Application;
import io.crnk.spring.app.BasicSpring3Application;
import io.crnk.spring.setup.boot.core.CrnkCoreProperties;
import io.crnk.spring.setup.boot.data.facet.CrnkFacetProperties;
import io.crnk.spring.setup.boot.data.facet.FacetModuleConfigurer;
Expand Down Expand Up @@ -68,9 +68,9 @@
import org.springframework.web.client.RestTemplate;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = BasicSpringBoot2Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = "server.error.include-message=always")
@SpringBootTest(classes = BasicSpringBoot3Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, properties = "server.error.include-message=always")
@DirtiesContext
public class BasicSpringBoot2Test {
public class BasicSpringBoot3Test {

@Value("${local.server.port}")
private int port;
Expand Down Expand Up @@ -310,4 +310,4 @@ public void testErrorsSerializedAsJsonApi() throws IOException {
Assert.assertEquals("No message available", errorData.getDetail());
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io.crnk.core.engine.information.resource.ResourceField;
import io.crnk.core.engine.registry.RegistryEntry;
import io.crnk.core.engine.registry.ResourceRegistry;
import io.crnk.spring.app.BasicSpringBoot2Application;
import io.crnk.spring.app.BasicSpringBoot3Application;
import io.crnk.test.mock.models.RenamedIdResource;
import org.junit.Assert;
import org.junit.Test;
Expand All @@ -16,7 +16,7 @@
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = BasicSpringBoot2Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(classes = BasicSpringBoot3Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@DirtiesContext
@TestPropertySource(properties = {"crnk.enforceIdName=false"})
public class SpringEnforceIdNameDisabledTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import io.crnk.core.engine.information.resource.ResourceField;
import io.crnk.core.engine.registry.RegistryEntry;
import io.crnk.core.engine.registry.ResourceRegistry;
import io.crnk.spring.app.BasicSpringBoot2Application;
import io.crnk.spring.app.BasicSpringBoot3Application;
import io.crnk.test.mock.models.RenamedIdResource;
import org.junit.Assert;
import org.junit.Test;
Expand All @@ -16,7 +16,7 @@
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = BasicSpringBoot2Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(classes = BasicSpringBoot3Application.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@DirtiesContext
@TestPropertySource(properties = {"crnk.enforceIdName=true"})
public class SpringEnforceIdNameEnabledTest {
Expand Down

0 comments on commit 5aebf74

Please sign in to comment.