[New] Added dependency to li.strolch.rest
This commit is contained in:
parent
6ab0e0f5cc
commit
acbda222cf
6
pom.xml
6
pom.xml
|
@ -38,15 +38,21 @@
|
|||
</scm>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>li.strolch</groupId>
|
||||
<artifactId>li.strolch.bom</artifactId>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>li.strolch</groupId>
|
||||
<artifactId>li.strolch.rest</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>li.strolch</groupId>
|
||||
<artifactId>li.strolch.persistence.xml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
|
|
|
@ -17,6 +17,7 @@ package li.strolch.tutorialwebapp.postinitializer;
|
|||
|
||||
import li.strolch.agent.impl.ComponentContainerImpl;
|
||||
import li.strolch.agent.impl.SimplePostInitializer;
|
||||
import li.strolch.rest.inspector.AgentRef;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -34,9 +35,12 @@ public class PostInitializer extends SimplePostInitializer {
|
|||
|
||||
@Override
|
||||
public void start() {
|
||||
|
||||
|
||||
logger.info("Initializing RestfulServices...");
|
||||
AgentRef.getInstance().init(getContainer().getAgent());
|
||||
|
||||
logger.info("Started PostInitializer."); //$NON-NLS-1$
|
||||
|
||||
|
||||
super.start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright 2013 Robert von Burg <eitch@eitchnet.ch>
|
||||
*
|
||||
* Licensed 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 li.strolch.tutorialwebapp.web.rest;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.ws.rs.ApplicationPath;
|
||||
import javax.ws.rs.core.Application;
|
||||
|
||||
import li.strolch.rest.inspector.StrolchRestfulClasses;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
@ApplicationPath("rest")
|
||||
public class RestfulApplication extends Application {
|
||||
|
||||
@Override
|
||||
public Set<Class<?>> getClasses() {
|
||||
Set<Class<?>> classes = new HashSet<>();
|
||||
classes.addAll(StrolchRestfulClasses.getClasses());
|
||||
return classes;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue