Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-343

Solver configuration should optionally auto-detect annotated solution and entity classes instead enumerating them

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Critical Critical
    • 6.3.0.CR1
    • 6.2.0.Final
    • optaplanner-core
    • None

      Instead of

        <solutionClass>org.optaplanner.examples.cloudbalancing.domain.CloudBalance</solutionClass>
        <entityClass>org.optaplanner.examples.cloudbalancing.domain.CloudProcess</entityClass>
      

      we should be able to do something like this (similar to jpa's xml):

      <scanForAnnotatedClasses>true</scanForAnnotatedClasses>
      

      or confine detection to a certain java package (would be useful for the examples and might be faster):

      <scanForAnnotatedClasses>true</scanForAnnotatedClasses>
      <scanForAnnotatedClassesPackageInclude>org.optaplanner.examples.cloudbalancing.domain</scanForAnnotatedClassesPackageInclude>
      <scanForAnnotatedClassesPackageInclude>org.optaplanner.examples.common.domain</scanForAnnotatedClassesPackageInclude>
      

      Maybe we should even default <scanForAnnotatedClasses> to true if no <entityClass> or <solutionClass> elements are present? Wdyt?

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: