Skip to content
This repository was archived by the owner on Dec 11, 2021. It is now read-only.

Commit

Permalink
hotfix: fixed package scanner for reflections
Browse files Browse the repository at this point in the history
  • Loading branch information
use-to committed Jun 17, 2019
1 parent 020a51a commit 289b847
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/main/java/net/cryptic_game/microservice/MicroService.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import org.json.simple.parser.ParseException;
import org.reflections.Reflections;
import org.reflections.scanners.MethodAnnotationsScanner;
import org.reflections.util.ClasspathHelper;
import org.reflections.util.ConfigurationBuilder;

import io.netty.bootstrap.Bootstrap;
import io.netty.buffer.Unpooled;
Expand Down Expand Up @@ -54,7 +52,7 @@ public static MicroService getInstance() {
private String name;
private Channel channel;

public MicroService(String name) {
public MicroService(String name) {
this.name = name;

instance = this;
Expand Down Expand Up @@ -93,8 +91,7 @@ private void start() {
}

private void init() {
Reflections reflections = new Reflections(new ConfigurationBuilder()
.setUrls(ClasspathHelper.forPackage("net.cryptic_game")).setScanners(new MethodAnnotationsScanner()));
Reflections reflections = new Reflections("net.cryptic_game.microservice", new MethodAnnotationsScanner());
{
Set<Method> methods = reflections.getMethodsAnnotatedWith(UserEndpoint.class);
for (Method method : methods) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ public static void main(String[] args) {
}

}

0 comments on commit 289b847

Please sign in to comment.