File tree Expand file tree Collapse file tree
src/main/java/com/github/sfxd/trust Expand file tree Collapse file tree Original file line number Diff line number Diff line change 209209 <extensions >true</extensions >
210210 </plugin >
211211 </plugins >
212+ <testResources >
213+ <testResource >
214+ <directory >src/main/resources</directory >
215+ </testResource >
216+ </testResources >
212217 </build >
213218
214219 <profiles >
Original file line number Diff line number Diff line change 1010
1111@ Singleton
1212public class JdaMessages implements Messages {
13- //field injection is delayed so it avoids the circle
14- @ Inject JDA jda ;
13+ private final JDA jda ;
14+
15+ @ Inject
16+ public JdaMessages (JDA jda ) {
17+ this .jda = jda ;
18+ }
1519
1620 @ Override
1721 public void send (Message message ) {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public class PropertiesProducer {
1212 @ Bean
1313 public Properties produceProperties () throws IOException {
1414 var properties = new Properties ();
15- try (InputStream is = getClass ().getResourceAsStream ("application.properties" )) {
15+ try (InputStream is = getClass ().getClassLoader (). getResourceAsStream ("application.properties" )) {
1616 properties .load (is );
1717 }
1818
Original file line number Diff line number Diff line change 66
77
88import com .github .sfxd .trust .instances .query .QInstance ;
9- import io .ebean .Database ;
10- import jakarta .inject .Inject ;
9+ import io .ebean .DB ;
1110import jakarta .inject .Singleton ;
1211
1312/** Finder for the Instance model */
1413@ Singleton
1514public class InstanceRepository {
1615
17- private final Database database ;
18-
19- @ Inject
20- public InstanceRepository (Database database ) {
21- this .database = database ;
22- }
23-
2416 /**
2517 * Finds an instance by its unique key (i.e. NA99, CS104)
2618 *
@@ -61,6 +53,6 @@ public Collection<Instance> findByIdIn(Collection<Long> ids) {
6153 }
6254
6355 public void save (Collection <Instance > instances ) {
64- this . database .saveAll (instances );
56+ DB .saveAll (instances );
6557 }
6658}
You can’t perform that action at this time.
0 commit comments