Skip to content

Commit

Permalink
drop testutil customization
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed May 3, 2024
1 parent 4b6e246 commit 907d773
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions generators/server/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,28 +445,6 @@ class `,
);
},

testUtil({ application: { srcTestJava, packageFolder, packageName, reactive } }) {
if (reactive) return;
this.editFile(`${srcTestJava}${packageFolder}/web/rest/TestUtil.java`, { assertModified: true }, contents =>
contents.includes('JacksonNativeConfiguration')
? contents
: contents
.replace(
'import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;',
`import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import ${packageName}.config.JacksonNativeConfiguration;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;`,
)
.replace(
'mapper.registerModule(new JavaTimeModule());',
`mapper.registerModule(new JavaTimeModule());
Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder();
new JacksonNativeConfiguration().customizeJackson().customize(builder);
builder.configure(mapper);`,
),
);
},

// workaround for arch error in backend:unit:test caused by gradle's org.graalvm.buildtools.native plugin
technicalStructureTest({ application: { buildToolGradle, srcTestJava, packageFolder } }) {
if (!buildToolGradle) return;
Expand Down

0 comments on commit 907d773

Please sign in to comment.