Skip to content

Commit

Permalink
add missing constructor arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
heinpa committed Aug 13, 2020
1 parent 2c20d85 commit 97d5f2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package eu.wdaqua.qanary.ambiverse;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand All @@ -24,8 +25,8 @@ public class Application {
* @return
*/
@Bean
public QanaryComponent qanaryComponent() {
return new AmbiverseNed();
public QanaryComponent qanaryComponent(@Value("${spring.application.name}")final String applicationName) {
return new AmbiverseNed(applicationName);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.slf4j.LoggerFactory;

import eu.wdaqua.qanary.stanfordner.StanfordNERComponent.Selection;
import org.springframework.beans.factory.annotation.Value;

public class StanfordNERComponentTest {

Expand All @@ -21,8 +22,8 @@ public class StanfordNERComponentTest {
private static final Logger logger = LoggerFactory.getLogger(StanfordNERComponentTest.class);

@BeforeClass
public static void initStanfordNERComponent() {
myStanfordNERComponent = new StanfordNERComponent();
public static void initStanfordNERComponent(@Value("${spring.application.name") final String applicationName) {
myStanfordNERComponent = new StanfordNERComponent(applicationName);
}

public void extendQuestionsMap(HashMap<String, ArrayList<String>> questions, String myQuestion,
Expand Down

0 comments on commit 97d5f2e

Please sign in to comment.