scala - Best way to solve imports of file in same package but in different directory with Gatling -


i want clean code structure , put class/object files in directories in gatling project.

if put simulation class , utils class in same directory , same package not need import statement , works fine.

let's structure follow :

/user-files ----/simulations --------mysimulation.scala ----/utils --------router.scala 

i have tried several import or naming configuration able use router in simulation.

  1. follow package naming directories structure
  2. put simulations , utils class in same package

i have tried different style of import

//using package import packagename.router  //another try import packagename.router._  //without package name import router._ 

my attempt search solution on scala docs or stack overflow didn't helped me.

this error given after executing gatling.bat

not found: value router 

you can't way: there's 1 single source folder, default /user-files/simulations.

if want use folders/packages (which thing), can have structure such as:

/user-files ----/simulations --------mysimulation.scala --------/utils ------------router.scala 

then, in scala, packages , folder hierarchy not related, it's practice use same convention in java.

so, have:

package utils object router 

then in mysimulation:

import utils.router 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -