Skip to content
Snippets Groups Projects
Verified Commit f02e78b0 authored by 家乐 袁's avatar 家乐 袁
Browse files

test:jar import

parent a39de479
No related branches found
No related tags found
No related merge requests found
File added
......@@ -17,6 +17,13 @@
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>com</groupId>
<artifactId>sentistrength_backend</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/sentistrength-1.0.0-SNAPSHOT.jar</systemPath>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
......@@ -145,6 +152,8 @@
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.5.RELEASE</version>
<configuration>
<executable>true</executable>
<includeSystemScope>true</includeSystemScope>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
......
......@@ -8,6 +8,10 @@ import com.sentistrength.service.Interface.user.UserService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import uk.ac.wlv.sentistrength.ClassificationOptions;
import uk.ac.wlv.sentistrength.ClassificationResources;
import uk.ac.wlv.sentistrength.SentiStrength;
import uk.ac.wlv.sentistrength.SentimentWords;
import java.util.ArrayList;
import java.util.List;
......@@ -17,9 +21,15 @@ public class UserServiceImpl implements UserService {
private final UserDao userDao;
public ClassificationOptions classificationOptions;
public ClassificationResources classificationResources;
@Autowired
public UserServiceImpl(UserDao userDao) {
this.userDao = userDao;
classificationOptions=new ClassificationOptions();
classificationResources=new ClassificationResources();
classificationResources.initialise(classificationOptions);
}
@Override
......@@ -49,4 +59,9 @@ public class UserServiceImpl implements UserService {
return ans;
}
@Override
public String action() {
return classificationResources.sentimentWords.getSentimentWord(2);
}
}
\ No newline at end of file
......@@ -2,10 +2,13 @@ package com.sentistrength.service.Interface.user;
import com.sentistrength.model.vo.user.UserVO;
import javax.print.DocFlavor;
public interface UserService {
void register(UserVO userVO);
UserVO login(String username, String password);
String action();
}
......@@ -29,4 +29,9 @@ public class UserController {
return Response.buildSuccess(userService.login(username, password));
}
@GetMapping("/action")
public Response login() {
return Response.buildSuccess(userService.action());
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment