mirror of https://github.com/apache/druid.git
add some service crap
This commit is contained in:
parent
55b2051f9d
commit
074161dfde
|
@ -598,6 +598,7 @@ public class Launcher
|
|||
// ret.add(new AvaticaBasedConnectionModule());
|
||||
ret.add(binder -> binder.bind(RequestLogger.class).toInstance(new TestRequestLogger()));
|
||||
ret.add(CacheTestHelperModule.ResultCacheMode.DISABLED.makeModule());
|
||||
ret.add(new QuidemCaptureModule());
|
||||
ret.addAll(super.getModules());
|
||||
return ret;
|
||||
}
|
||||
|
@ -606,6 +607,7 @@ public class Launcher
|
|||
};
|
||||
framework.injector().injectMembers(c);
|
||||
// c.configure(new Properties());
|
||||
|
||||
c.run();
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.druid.quidem;
|
||||
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
@Path("/quidem")
|
||||
public class QuidemCapture
|
||||
{
|
||||
|
||||
@GET
|
||||
@Path("/")
|
||||
@Produces(MediaType.TEXT_PLAIN)
|
||||
public String getSome()
|
||||
{
|
||||
return "Asd";
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/asd")
|
||||
@Produces(MediaType.TEXT_PLAIN)
|
||||
public String getSome1()
|
||||
{
|
||||
return "Asd";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.apache.druid.quidem;
|
||||
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.Module;
|
||||
import org.apache.druid.guice.Jerseys;
|
||||
|
||||
public class QuidemCaptureModule implements Module
|
||||
{
|
||||
|
||||
@Override
|
||||
public void configure(Binder binder)
|
||||
{
|
||||
Jerseys.addResource(binder, QuidemCapture.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue