Skip to content

@JsonTest depends on Gson #6502

Closed
Closed
@hantsy

Description

@hantsy

I am trying to upgrade to my sample project to Spring Boot 1.4.0.RELEASE from 1.4.0.RC.

Almost no change in codes but in the new version(1.4.0.RELEASE ) @jsontest will raise NoClassDef exception when run my test codes.

https://github.com/hantsy/angularjs-springmvc-sample-boot/blob/master/src/test/java/com/hantsylabs/restexample/springmvc/test/slice/LocalDateTimeJsonComponentTest.java

I have to add a new dependency in test scope to avoid this exception.

    <!--test -->
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.7</version>
        <scope>test</scope>
    </dependency>

I am always using Jackson to process JSON in this sample.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions