diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml new file mode 100644 index 0000000..ccabfd1 --- /dev/null +++ b/.github/workflows/on-pull-request.yml @@ -0,0 +1,27 @@ +name: Java CI with Gradle + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Run chmod to make gradlew executable + run: chmod +x ./gradlew + - name: Build with Gradle + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + with: + arguments: build + - run: ./gradlew spotlessCheck diff --git a/build.gradle.kts b/build.gradle.kts index 2d484ec..f4b29ce 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ plugins { id("java") id("org.jetbrains.intellij") version "1.11.0" + id("com.diffplug.spotless") version "6.17.0" application } @@ -25,6 +26,7 @@ dependencies{ implementation("org.mapstruct:mapstruct:1.5.3.Final") // https://mvnrepository.com/artifact/org.mapstruct/mapstruct-processor implementation("org.mapstruct:mapstruct-processor:1.5.3.Final") + } @@ -45,37 +47,48 @@ tasks { } } -configurations.all { - resolutionStrategy.sortArtifacts(ResolutionStrategy.SortOrder.DEPENDENCY_FIRST) -} + configurations.all { + resolutionStrategy.sortArtifacts(ResolutionStrategy.SortOrder.DEPENDENCY_FIRST) + } // Configure Gradle IntelliJ Plugin // Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html -intellij { - version.set("2022.3.1") - type.set("IC") // Target IDE Platform - plugins.set(listOf("com.intellij.java")) -} - -tasks { - // Set the JVM compatibility versions - withType { - sourceCompatibility = "17" - targetCompatibility = "17" + intellij { + version.set("2022.3.1") + type.set("IC") // Target IDE Platform + plugins.set(listOf("com.intellij.java")) } - patchPluginXml { - sinceBuild.set("222") - untilBuild.set("231.*") - } + tasks { + // Set the JVM compatibility versions + withType { + sourceCompatibility = "17" + targetCompatibility = "17" + } - signPlugin { - certificateChain.set(System.getenv("CERTIFICATE_CHAIN")) - privateKey.set(System.getenv("PRIVATE_KEY")) - password.set(System.getenv("PRIVATE_KEY_PASSWORD")) - } + patchPluginXml { + sinceBuild.set("222") + untilBuild.set("231.*") + } + + signPlugin { + certificateChain.set(System.getenv("CERTIFICATE_CHAIN")) + privateKey.set(System.getenv("PRIVATE_KEY")) + password.set(System.getenv("PRIVATE_KEY_PASSWORD")) + } - publishPlugin { - token.set(System.getenv("PUBLISH_TOKEN")) + publishPlugin { + token.set(System.getenv("PUBLISH_TOKEN")) + } + + spotless { + java { + googleJavaFormat() + removeUnusedImports() + palantirJavaFormat() + trimTrailingWhitespace() + endWithNewline() + } + } } -} + diff --git a/src/main/java/com/techconative/actions/DozerTOMapperStructPlugin.java b/src/main/java/com/techconative/actions/DozerTOMapperStructPlugin.java index 7a862a6..765bb44 100644 --- a/src/main/java/com/techconative/actions/DozerTOMapperStructPlugin.java +++ b/src/main/java/com/techconative/actions/DozerTOMapperStructPlugin.java @@ -14,13 +14,6 @@ import com.intellij.util.ui.JBUI; import com.techconative.actions.generators.GenerateMappings; import com.techconative.actions.utilities.Utilities; -import org.jetbrains.annotations.NotNull; -import org.w3c.dom.Document; - -import javax.swing.*; -import javax.swing.text.BadLocationException; -import javax.swing.text.SimpleAttributeSet; -import javax.swing.text.StyleConstants; import java.awt.*; import java.io.IOException; import java.nio.file.FileSystems; @@ -28,7 +21,12 @@ import java.util.List; import java.util.Objects; import java.util.stream.Collectors; - +import javax.swing.*; +import javax.swing.text.BadLocationException; +import javax.swing.text.SimpleAttributeSet; +import javax.swing.text.StyleConstants; +import org.jetbrains.annotations.NotNull; +import org.w3c.dom.Document; public class DozerTOMapperStructPlugin extends AnAction { @@ -47,8 +45,7 @@ public void actionPerformed(@NotNull AnActionEvent e) { if (GenerateMappings.checkXml(finalDocument)) { String code = null; try { - code = GenerateMappings.generateMappings(finalDocument, null, - false, "className", "attributeName"); + code = GenerateMappings.generateMappings(finalDocument, null, false, "className", "attributeName"); } catch (IOException | BadLocationException ex) { return; } @@ -61,19 +58,20 @@ public void actionPerformed(@NotNull AnActionEvent e) { } } else { FileChooserDescriptor fileChooserDescriptor = - new FileChooserDescriptor(false, true, false, - false, false, false); + new FileChooserDescriptor(false, true, false, false, false, false); String separator = FileSystems.getDefault().getSeparator(); - List virtualFiles = Arrays.stream(ProjectRootManager.getInstance(e.getProject()) - .getContentSourceRoots()).filter( - x -> (x.toNioPath().normalize().toString().replace(separator, ".") - .contains("src.main.java")) - ).collect(Collectors.toList()); + List virtualFiles = Arrays.stream( + ProjectRootManager.getInstance(e.getProject()).getContentSourceRoots()) + .filter(x -> (x.toNioPath() + .normalize() + .toString() + .replace(separator, ".") + .contains("src.main.java"))) + .collect(Collectors.toList()); fileChooserDescriptor.setRoots(virtualFiles); FileChooser.chooseFile(fileChooserDescriptor, e.getProject(), null, consumer -> { - JTextPanes(consumer.toNioPath().normalize().toString(), finalDocument); - } - ); + JTextPanes(consumer.toNioPath().normalize().toString(), finalDocument); + }); } } catch (RuntimeException ex) { return; @@ -102,7 +100,6 @@ public static void getJTextPlane(String code) throws BadLocationException { frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); frame.setLocationRelativeTo(null); frame.setVisible(true); - } void JTextPanes(String path, Document finalDocument) { @@ -112,7 +109,7 @@ void JTextPanes(String path, Document finalDocument) { GridBagConstraints constraints = new GridBagConstraints(); constraints.anchor = GridBagConstraints.WEST; - constraints.insets = JBUI.insets(5);//new Insets(10, 10, 10, 10) + constraints.insets = JBUI.insets(5); // new Insets(10, 10, 10, 10) constraints.gridx = 0; constraints.gridy = 0; @@ -145,8 +142,7 @@ void JTextPanes(String path, Document finalDocument) { JLabel label3 = new JLabel(path); panel.add(label3, constraints); - JOptionPane.showConfirmDialog(null, panel, "Input Dialog", - JOptionPane.OK_CANCEL_OPTION); + JOptionPane.showConfirmDialog(null, panel, "Input Dialog", JOptionPane.OK_CANCEL_OPTION); String className = Objects.requireNonNullElse(textField.getText(), "ClassName"); boolean isSelected = checkBox.isSelected(); String attributeName = Utilities.GetVariableNameFromClassName(className); @@ -155,8 +151,7 @@ void JTextPanes(String path, Document finalDocument) { if (isSelected) { GenerateMappings.generateMappings(finalDocument, path, true, className, attributeName); } else { - String code = GenerateMappings.generateMappings(finalDocument, path, - false, className, attributeName); + String code = GenerateMappings.generateMappings(finalDocument, path, false, className, attributeName); if (code != null) { getJTextPlane(code); } @@ -165,8 +160,5 @@ void JTextPanes(String path, Document finalDocument) { Messages.showMessageDialog(String.valueOf(ex), "ERROR", Messages.getErrorIcon()); return; } - } - - } diff --git a/src/main/java/com/techconative/actions/generators/GenerateMappings.java b/src/main/java/com/techconative/actions/generators/GenerateMappings.java index cf2dec3..bc2d52c 100644 --- a/src/main/java/com/techconative/actions/generators/GenerateMappings.java +++ b/src/main/java/com/techconative/actions/generators/GenerateMappings.java @@ -2,9 +2,19 @@ import com.intellij.openapi.ui.Messages; import com.squareup.javapoet.*; -import com.techconative.actions.DozerTOMapperStructPlugin; import com.techconative.actions.utilities.Utilities; -import org.apache.commons.collections.CollectionUtils; +import java.io.IOException; +import java.io.StringReader; +import java.nio.file.FileSystems; +import java.nio.file.Paths; +import java.util.*; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.stream.IntStream; +import javax.lang.model.element.Modifier; +import javax.swing.text.BadLocationException; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.Mappings; @@ -15,19 +25,6 @@ import org.xml.sax.InputSource; import org.xml.sax.SAXException; -import javax.lang.model.element.Modifier; -import javax.swing.text.BadLocationException; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import java.io.IOException; -import java.io.StringReader; -import java.nio.file.FileSystems; -import java.nio.file.Paths; -import java.util.*; -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.stream.IntStream; - public class GenerateMappings { private static Document initializeXmlDocumentBuilder(String selectedText) { @@ -60,8 +57,9 @@ public static boolean checkXml(Document finalDocument) { return length == 1; } - public static String generateMappings(Document finalDocument, String path, boolean generate, - String className, String mapperName) throws IOException, BadLocationException { + public static String generateMappings( + Document finalDocument, String path, boolean generate, String className, String mapperName) + throws IOException, BadLocationException { Map map = new HashMap<>(); AtomicBoolean partialMapping = new AtomicBoolean(false); @@ -72,62 +70,85 @@ public static String generateMappings(Document finalDocument, String path, boole TypeSpec.Builder builder = null; }; - if (length != finalDocument.getElementsByTagName("class-a").getLength() && - length != finalDocument.getElementsByTagName("class-b").getLength()) { + if (length != finalDocument.getElementsByTagName("class-a").getLength() + && length != finalDocument.getElementsByTagName("class-b").getLength()) { Messages.showMessageDialog("Wrong xml structure", "ERROR", Messages.getErrorIcon()); return null; } IntStream.range(0, length).forEachOrdered(x -> { map.clear(); - NodeList nodeList = finalDocument.getElementsByTagName("mapping").item(x).getChildNodes(); + NodeList nodeList = + finalDocument.getElementsByTagName("mapping").item(x).getChildNodes(); List annotationSpecList = new ArrayList<>(); - IntStream.range(0, nodeList.getLength()) - .mapToObj(nodeList::item) - .forEach(y -> { - - switch (y.getNodeName()) { - case "class-a" -> { - map.put("ClassAName", getClassName(y.getTextContent())); - map.put("packageA", getPackage(y.getTextContent())); - } - case "class-b" -> { - map.put("ClassBName", getClassName(y.getTextContent())); - map.put("packageB", getPackage(y.getTextContent())); - } - case "field" -> { - Element element = (Element) y; - AnnotationSpec.Builder annotationSpec = AnnotationSpec.builder(Mapping.class); - annotationSpec.addMember("source", "$S", - element.getElementsByTagName("a") - .item(0).getTextContent()).addMember("target", "$S", - element.getElementsByTagName("b").item(0).getTextContent()); - if (y.getAttributes().getNamedItem("map-id") != null) { - annotationSpec.addMember("qualifiedByName", "$S", - Utilities.findAndApply(y.getAttributes().getNamedItem("map-id") - .getTextContent())); - } - annotationSpecList.add(annotationSpec.build()); - } - case "field-exclude" -> { - Element element = (Element) y; - AnnotationSpec.Builder annotationSpec = AnnotationSpec.builder(Mapping.class); - annotationSpec.addMember("target", "$S", - element.getElementsByTagName("b").item(0) - .getTextContent()).addMember("ignore", "true"); - annotationSpecList.add(annotationSpec.build()); - } - } - } - ); + IntStream.range(0, nodeList.getLength()).mapToObj(nodeList::item).forEach(y -> { + switch (y.getNodeName()) { + case "class-a" -> { + map.put("ClassAName", getClassName(y.getTextContent())); + map.put("packageA", getPackage(y.getTextContent())); + } + case "class-b" -> { + map.put("ClassBName", getClassName(y.getTextContent())); + map.put("packageB", getPackage(y.getTextContent())); + } + case "field" -> { + Element element = (Element) y; + AnnotationSpec.Builder annotationSpec = AnnotationSpec.builder(Mapping.class); + annotationSpec + .addMember( + "source", + "$S", + element.getElementsByTagName("a") + .item(0) + .getTextContent()) + .addMember( + "target", + "$S", + element.getElementsByTagName("b") + .item(0) + .getTextContent()); + if (y.getAttributes().getNamedItem("map-id") != null) { + annotationSpec.addMember( + "qualifiedByName", + "$S", + Utilities.findAndApply(y.getAttributes() + .getNamedItem("map-id") + .getTextContent())); + } + annotationSpecList.add(annotationSpec.build()); + } + case "field-exclude" -> { + Element element = (Element) y; + AnnotationSpec.Builder annotationSpec = AnnotationSpec.builder(Mapping.class); + annotationSpec + .addMember( + "target", + "$S", + element.getElementsByTagName("b") + .item(0) + .getTextContent()) + .addMember("ignore", "true"); + annotationSpecList.add(annotationSpec.build()); + } + } + }); if (!alreadyExecuted.get() && path != null) { builder.builder = buildJavaClass(path, map, className, mapperName); alreadyExecuted.set(true); } - if (finalDocument.getElementsByTagName("mapping").item(x).getAttributes().getNamedItem("map-id") != null) { - String mapId = finalDocument.getElementsByTagName("mapping").item(x).getAttributes() - .getNamedItem("map-id").getTextContent(); + if (finalDocument + .getElementsByTagName("mapping") + .item(x) + .getAttributes() + .getNamedItem("map-id") + != null) { + String mapId = finalDocument + .getElementsByTagName("mapping") + .item(x) + .getAttributes() + .getNamedItem("map-id") + .getTextContent(); map.put("methodMapId", mapId); } if (finalDocument.getElementsByTagName("mappings").getLength() == 0 && length >= 1 && !generate) { @@ -147,7 +168,6 @@ public static String generateMappings(Document finalDocument, String path, boole } } - private static String getPackage(String value) { String[] strings = value.split("[.]"); return value.replace("." + strings[strings.length - 1], "").trim(); @@ -158,29 +178,34 @@ private static String getClassName(String value) { return strings[strings.length - 1]; } - static String generateMethod(Map map, List annotationSpecList, - boolean partialMapping, TypeSpec.Builder builder) { + static String generateMethod( + Map map, + List annotationSpecList, + boolean partialMapping, + TypeSpec.Builder builder) { ClassName classTypeB = ClassName.get(map.get("packageB"), map.get("ClassBName")); ClassName classTypeA = ClassName.get(map.get("packageA"), map.get("ClassAName")); - MethodSpec.Builder method = MethodSpec - .methodBuilder("to" + map.get("ClassBName")) + MethodSpec.Builder method = MethodSpec.methodBuilder("to" + map.get("ClassBName")) .addParameter(classTypeA, Utilities.getObjectNameForClassName(map.get("ClassAName"))) - .returns(classTypeB).addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT); + .returns(classTypeB) + .addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT); if (!annotationSpecList.isEmpty() && annotationSpecList != null) { AnnotationSpec.Builder anno = AnnotationSpec.builder(Mappings.class); - IntStream.range(0, annotationSpecList.size()).forEachOrdered(x -> - anno.addMember("value", "$L", annotationSpecList.get(x)) - ); + IntStream.range(0, annotationSpecList.size()) + .forEachOrdered(x -> anno.addMember("value", "$L", annotationSpecList.get(x))); method.addAnnotation(anno.build()); } if (map.containsKey("methodMapId")) { method.addAnnotation(AnnotationSpec.builder(Named.class) - .addMember("value", "$S", Utilities.findAndApply(map.get("methodMapId"))).build()); + .addMember("value", "$S", Utilities.findAndApply(map.get("methodMapId"))) + .build()); } if (partialMapping) { - return method.build().toString().replaceAll(map.get("packageB") + ".", "") + return method.build() + .toString() + .replaceAll(map.get("packageB") + ".", "") .replaceAll(map.get("packageA") + ".", ""); } else { builder.addMethod(method.build()); @@ -188,7 +213,8 @@ static String generateMethod(Map map, List annot } } - static private TypeSpec.Builder buildJavaClass(String path, Map map, String className, String mapperName) { + private static TypeSpec.Builder buildJavaClass( + String path, Map map, String className, String mapperName) { if (className.equals("className") || className.isBlank() || className.isEmpty()) { className = map.get("ClassAName") + map.get("ClassBName"); @@ -201,16 +227,14 @@ static private TypeSpec.Builder buildJavaClass(String path, Map .initializer("$T.getMapper($T.class)", Mappers, ClassTitle) .build(); - - return TypeSpec - .classBuilder(className) + return TypeSpec.classBuilder(className) .addModifiers(Modifier.PUBLIC, Modifier.ABSTRACT) .addAnnotation(Mapper.class) .addField(fieldSpec); - } - static private String generateJavaClass(String path, boolean generate, TypeSpec.Builder builder) throws IOException { + private static String generateJavaClass(String path, boolean generate, TypeSpec.Builder builder) + throws IOException { String[] strings = getPath(path); TypeSpec typeSpec = builder.build(); @@ -232,7 +256,7 @@ private static String[] getPath(String path) { return strings; } - static private void write(JavaFile javaFile, String path) throws IOException { + private static void write(JavaFile javaFile, String path) throws IOException { javaFile.writeTo(Paths.get(path)); } } diff --git a/src/main/java/com/techconative/actions/utilities/Utilities.java b/src/main/java/com/techconative/actions/utilities/Utilities.java index a50f2f2..2aea68f 100644 --- a/src/main/java/com/techconative/actions/utilities/Utilities.java +++ b/src/main/java/com/techconative/actions/utilities/Utilities.java @@ -7,7 +7,8 @@ public class Utilities { public static String getObjectNameForClassName(String className) { - return className.replaceFirst(String.valueOf(className.charAt(0)), + return className.replaceFirst( + String.valueOf(className.charAt(0)), String.valueOf(className.charAt(0)).toLowerCase()); } @@ -35,37 +36,28 @@ public static String GetVariableNameFromClassName(String className) { } public static String findAndApply(String text) { - if (text.matches("^[a-z]+([A-Z][a-z0-9]+)+")){ + if (text.matches("^[a-z]+([A-Z][a-z0-9]+)+")) { return text; } - int ctr = 0 ; - int n = text.length( ) ; - char ch[ ] = text.toCharArray( ) ; - int c = 0 ; - for ( int i = 0; i < n; i++ ) - { - if( i == 0 ) - ch[ i ] = Character.toLowerCase( ch[ i ] ) ; - if ( ch[ i ] == ' ' ) - { - ctr++ ; - ch[ i + 1 ] = Character.toUpperCase( ch[ i + 1] ) ; - continue ; - } - else - ch[ c++ ] = ch[ i ] ; + int ctr = 0; + int n = text.length(); + char ch[] = text.toCharArray(); + int c = 0; + for (int i = 0; i < n; i++) { + if (i == 0) ch[i] = Character.toLowerCase(ch[i]); + if (ch[i] == ' ') { + ctr++; + ch[i + 1] = Character.toUpperCase(ch[i + 1]); + continue; + } else ch[c++] = ch[i]; } - return String.valueOf( ch, 0, n - ctr ).replace("_","") - .replace("-",""); - + return String.valueOf(ch, 0, n - ctr).replace("_", "").replace("-", ""); } public static String apply(String text) { text = findAndApply(text); - return String.valueOf(text.charAt(0)).toUpperCase() + text.replaceFirst("" + text.charAt(0), "") - .replace("_","").replace("-",""); + return String.valueOf(text.charAt(0)).toUpperCase() + + text.replaceFirst("" + text.charAt(0), "").replace("_", "").replace("-", ""); } - - } diff --git a/src/test/java/com/techconative/actions/generators/GenerateMappingsTest.java b/src/test/java/com/techconative/actions/generators/GenerateMappingsTest.java index bbdbad3..f788abe 100644 --- a/src/test/java/com/techconative/actions/generators/GenerateMappingsTest.java +++ b/src/test/java/com/techconative/actions/generators/GenerateMappingsTest.java @@ -1,12 +1,10 @@ package com.techconative.actions.generators; +import java.io.IOException; +import javax.swing.text.BadLocationException; import org.junit.Assert; import org.w3c.dom.Document; -import javax.swing.text.BadLocationException; -import java.io.IOException; - - public class GenerateMappingsTest { public static void main(String[] args) throws IOException, BadLocationException { GenerateMappingsTest test = new GenerateMappingsTest(); @@ -14,7 +12,8 @@ public static void main(String[] args) throws IOException, BadLocationException } public void run() throws IOException, BadLocationException { - String xml = """ + String xml = + """ com.techconative.actions.model.DAO.EmployeeDAO com.techconative.actions.model.DTO.EmployeeDTO @@ -31,7 +30,8 @@ public void run() throws IOException, BadLocationException { empNumber """; - String expected = """ + String expected = + """ @Mappings({ @Mapping(source = "name", target = "empName", qualifiedByName = "referenceMethod"), @Mapping(source = "description", target = "empDescription"), @@ -42,9 +42,8 @@ public void run() throws IOException, BadLocationException { """; Document finalDocument = GenerateMappings.getDocument(xml); - String actual = GenerateMappings.generateMappings(finalDocument, - null, false, "className", "attributeName"); + String actual = GenerateMappings.generateMappings(finalDocument, null, false, "className", "attributeName"); System.out.println(actual); Assert.assertEquals(expected, actual); } -} \ No newline at end of file +} diff --git a/src/test/java/com/techconative/actions/model/DAO/EmployeeDAO.java b/src/test/java/com/techconative/actions/model/DAO/EmployeeDAO.java index ce0d888..7779f10 100644 --- a/src/test/java/com/techconative/actions/model/DAO/EmployeeDAO.java +++ b/src/test/java/com/techconative/actions/model/DAO/EmployeeDAO.java @@ -1,6 +1,5 @@ package com.techconative.actions.model.DAO; - public class EmployeeDAO { private String name; private String description; diff --git a/src/test/java/com/techconative/actions/model/DAO/StudentDAO.java b/src/test/java/com/techconative/actions/model/DAO/StudentDAO.java index c94d3a7..a5ee5b3 100644 --- a/src/test/java/com/techconative/actions/model/DAO/StudentDAO.java +++ b/src/test/java/com/techconative/actions/model/DAO/StudentDAO.java @@ -1,10 +1,10 @@ package com.techconative.actions.model.DAO; - public class StudentDAO { private String name; private String description; private int age; + public String getName() { return name; } diff --git a/src/test/java/com/techconative/actions/model/DTO/EmployeeDTO.java b/src/test/java/com/techconative/actions/model/DTO/EmployeeDTO.java index faeec2a..d99f6c0 100644 --- a/src/test/java/com/techconative/actions/model/DTO/EmployeeDTO.java +++ b/src/test/java/com/techconative/actions/model/DTO/EmployeeDTO.java @@ -1,10 +1,10 @@ package com.techconative.actions.model.DTO; - public class EmployeeDTO { private String empName; private String empDescription; private int empNumber; + public String getEmpName() { return empName; } diff --git a/src/test/java/com/techconative/actions/model/DTO/StudentDTO.java b/src/test/java/com/techconative/actions/model/DTO/StudentDTO.java index b1056d4..99835c1 100644 --- a/src/test/java/com/techconative/actions/model/DTO/StudentDTO.java +++ b/src/test/java/com/techconative/actions/model/DTO/StudentDTO.java @@ -1,6 +1,5 @@ package com.techconative.actions.model.DTO; - public class StudentDTO { private String studentName; private String studentDescription;