Skip to content

Commit 8d72bbe

Browse files
authored
Extract graphql-jpa-query-web module from starter (#74)
* fix: Extract graphql-jpa-query-web module from starter * fix: (git) add .classpath to .gitignore * fix: add GraphQLControllerAutoConfigurationTest
1 parent b0839ca commit 8d72bbe

File tree

19 files changed

+141
-29
lines changed

19 files changed

+141
-29
lines changed

.gitignore

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Eclipse
2-
#.classpath
32
.project/
43
.settings/
54
build/
@@ -21,13 +20,4 @@ target/
2120
# Eclipse
2221
.project
2322
.springBeans
24-
25-
26-
27-
graphql-jpa-query-schema/\.classpath
28-
29-
graphql-jpa-query-annotations/\.classpath
30-
31-
graphql-jpa-query-example/\.classpath
32-
33-
graphql-jpa-query-boot-starter/\.classpath
23+
.classpath

graphql-jpa-query-boot-starter/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
<artifactId>graphql-jpa-query-autoconfigure</artifactId>
2424
</dependency>
2525

26+
<dependency>
27+
<groupId>com.introproventures</groupId>
28+
<artifactId>graphql-jpa-query-web</artifactId>
29+
</dependency>
30+
2631
<dependency>
2732
<groupId>org.springframework.boot</groupId>
2833
<artifactId>spring-boot-starter</artifactId>

graphql-jpa-query-boot-starter/src/main/java/com/introproventures/graphql/jpa/query/boot/autoconfigure/EnableGraphQLJpaQuery.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
import java.lang.annotation.Retention;
2323
import java.lang.annotation.Target;
2424

25+
import com.introproventures.graphql.jpa.query.boot.autoconfigure.GraphQLJpaQueryAutoConfiguration.DefaultGraphQLJpaQueryConfiguration;
26+
import com.introproventures.graphql.jpa.query.boot.autoconfigure.GraphQLJpaQueryAutoConfiguration.GraphQLJpaQuerySchemaConfigurer;
2527
import org.springframework.context.annotation.Import;
2628
import org.springframework.context.annotation.PropertySource;
2729

28-
import com.introproventures.graphql.jpa.query.boot.autoconfigure.GraphQLJpaQueryAutoConfiguration.DefaultActivitiGraphQLJpaConfiguration;
29-
3030
@Documented
3131
@Retention( RUNTIME )
3232
@Target( TYPE )
33-
@Import(DefaultActivitiGraphQLJpaConfiguration.class)
33+
@Import({DefaultGraphQLJpaQueryConfiguration.class, GraphQLJpaQuerySchemaConfigurer.class})
3434
@PropertySource("classpath:/com/introproventures/graphql/jpa/query/boot/autoconfigure/default.properties")
3535
public @interface EnableGraphQLJpaQuery {
3636

graphql-jpa-query-boot-starter/src/main/java/com/introproventures/graphql/jpa/query/boot/autoconfigure/GraphQLJpaQueryAutoConfiguration.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import com.introproventures.graphql.jpa.query.schema.GraphQLSchemaBuilder;
2424
import com.introproventures.graphql.jpa.query.schema.impl.GraphQLJpaExecutor;
2525
import com.introproventures.graphql.jpa.query.schema.impl.GraphQLJpaSchemaBuilder;
26-
import com.introproventures.graphql.jpa.query.web.GraphQLController;
2726
import graphql.GraphQL;
2827
import graphql.schema.GraphQLSchema;
2928
import org.springframework.beans.factory.annotation.Autowired;
@@ -33,7 +32,6 @@
3332
import org.springframework.boot.context.properties.EnableConfigurationProperties;
3433
import org.springframework.context.annotation.Bean;
3534
import org.springframework.context.annotation.Configuration;
36-
import org.springframework.context.annotation.Import;
3735
import org.springframework.context.annotation.ImportAware;
3836
import org.springframework.context.annotation.PropertySource;
3937
import org.springframework.core.type.AnnotationMetadata;
@@ -62,9 +60,8 @@ public void configure(GraphQLShemaRegistration registry) {
6260
}
6361

6462
@Configuration
65-
@Import(GraphQLController.class)
6663
@EnableConfigurationProperties(GraphQLJpaQueryProperties.class)
67-
public static class DefaultActivitiGraphQLJpaConfiguration implements ImportAware {
64+
public static class DefaultGraphQLJpaQueryConfiguration implements ImportAware {
6865

6966
@Autowired
7067
GraphQLJpaQueryProperties properties;

graphql-jpa-query-boot-starter/src/test/java/com/introproventures/graphql/jpa/query/boot/autoconfigure/EnableGraphQLJpaQueryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import com.introproventures.graphql.jpa.query.schema.GraphQLSchemaBuilder;
3131
import com.introproventures.graphql.jpa.query.schema.impl.GraphQLJpaExecutor;
3232
import com.introproventures.graphql.jpa.query.schema.impl.GraphQLJpaSchemaBuilder;
33-
import com.introproventures.graphql.jpa.query.web.model.Author;
33+
import com.introproventures.graphql.jpa.query.starter.model.Author;
3434

3535
@RunWith(SpringRunner.class)
3636
@SpringBootTest(

graphql-jpa-query-boot-starter/src/test/java/com/introproventures/graphql/jpa/query/boot/autoconfigure/GraphQLJpaQueryAutoConfigurationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import com.introproventures.graphql.jpa.query.schema.GraphQLSchemaBuilder;
3131
import com.introproventures.graphql.jpa.query.schema.impl.GraphQLJpaExecutor;
3232
import com.introproventures.graphql.jpa.query.schema.impl.GraphQLJpaSchemaBuilder;
33-
import com.introproventures.graphql.jpa.query.web.model.Author;
33+
import com.introproventures.graphql.jpa.query.starter.model.Author;
3434

3535
@RunWith(SpringRunner.class)
3636
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.introproventures.graphql.jpa.query.web;
16+
package com.introproventures.graphql.jpa.query.starter;
1717

1818
import java.io.IOException;
1919
import java.util.HashMap;
@@ -41,7 +41,7 @@
4141

4242
@RunWith(SpringRunner.class)
4343
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
44-
public class GraphQLControllerIT {
44+
public class GraphQLJpaQueryStarterIT {
4545
private static final String WAR_AND_PEACE = "War and Peace";
4646

4747
@SpringBootApplication
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.introproventures.graphql.jpa.query.web.model;
17+
package com.introproventures.graphql.jpa.query.starter.model;
1818

1919
import java.util.Collection;
2020

graphql-jpa-query-boot-starter/src/test/java/com/introproventures/graphql/jpa/query/web/model/Book.java renamed to graphql-jpa-query-boot-starter/src/test/java/com/introproventures/graphql/jpa/query/starter/model/Book.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.introproventures.graphql.jpa.query.web.model;
17+
package com.introproventures.graphql.jpa.query.starter.model;
1818

1919
import javax.persistence.Entity;
2020
import javax.persistence.EnumType;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.introproventures.graphql.jpa.query.web.model;
17+
package com.introproventures.graphql.jpa.query.starter.model;
1818

1919
public enum Genre {
2020
NOVEL, PLAY

0 commit comments

Comments
 (0)