0

I have below code when I run this , Not sure why package name is coming with this

com.heiler.ppm.fulltextsearch.object.FullTextSearchConfigModel@5c3bd550[indexName=Items_AllSupplierCatalogs_en,indexLabel=Items (All Supplier Catalogs) en,alias=,catalogs=[SupplierCatalog1, SupplierCatalog2],rootEntities=[com.heiler.ppm.fulltextsearch.object.RootEntity@6a41eaa2[entityIdentifier=Article,fields=[com.heiler.ppm.fulltextsearch.object.Field@7cd62f43[name=Article.SupplierAID,type=text,searchable=true,sortable=true,facetable=false,additionalProperties={}]],subEntities=

public class ExportToESMappingCreator {


    public static void main(String[] args) {
         ObjectMapper objectMapper = new ObjectMapper();
         FullTextSearchConfigModel searchConfig= null;
         try {
              searchConfig= objectMapper.readValue(new File("src\\main\\resources\\indexconfig.json"), FullTextSearchConfigModel.class);
            // System.out.println(searchConfig.toString());
            // String json=objectMapper.writeValueAsString(searchConfig);
             System.out.println(searchConfig);
         } catch (JsonParseException e) {

            e.printStackTrace();
        } catch (JsonMappingException e) {

            e.printStackTrace();
        } catch (IOException e) {

            e.printStackTrace();
        }


    }
}
lealceldeiro
  • 14,342
  • 6
  • 49
  • 80
user5702955
  • 135
  • 1
  • 3
  • 10

1 Answers1

1

Likely the toString() method of FullTextSearchConfigModel (which is getting invoked when you print the object) uses getClass() to build the String representation of the object, which returns the fully qualified class name (i.e. including the package name). See https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--