mirror of https://github.com/OpenVidu/openvidu.git
openvidu-sample-app package renamed
parent
cb5addec9d
commit
6c5ab49b78
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app;
|
package io.openvidu.sample.app;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
@ -1,13 +1,13 @@
|
||||||
package openvidu.openvidu_sample_app;
|
package io.openvidu.sample.app;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.CommandLineRunner;
|
import org.springframework.boot.CommandLineRunner;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
import openvidu.openvidu_sample_app.user.UserRepository;
|
import io.openvidu.sample.app.lesson.Lesson;
|
||||||
import openvidu.openvidu_sample_app.user.User;
|
import io.openvidu.sample.app.lesson.LessonRepository;
|
||||||
import openvidu.openvidu_sample_app.lesson.LessonRepository;
|
import io.openvidu.sample.app.user.User;
|
||||||
import openvidu.openvidu_sample_app.lesson.Lesson;
|
import io.openvidu.sample.app.user.UserRepository;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class DatabaseInitializer implements CommandLineRunner {
|
public class DatabaseInitializer implements CommandLineRunner {
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app.lesson;
|
package io.openvidu.sample.app.lesson;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -11,7 +11,8 @@ import javax.persistence.ManyToMany;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonView;
|
import com.fasterxml.jackson.annotation.JsonView;
|
||||||
import openvidu.openvidu_sample_app.user.User;
|
|
||||||
|
import io.openvidu.sample.app.user.User;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class Lesson {
|
public class Lesson {
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app.lesson;
|
package io.openvidu.sample.app.lesson;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -14,9 +14,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import openvidu.openvidu_sample_app.user.User;
|
import io.openvidu.sample.app.user.User;
|
||||||
import openvidu.openvidu_sample_app.user.UserComponent;
|
import io.openvidu.sample.app.user.UserComponent;
|
||||||
import openvidu.openvidu_sample_app.user.UserRepository;
|
import io.openvidu.sample.app.user.UserRepository;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api-lessons")
|
@RequestMapping("/api-lessons")
|
|
@ -1,10 +1,10 @@
|
||||||
package openvidu.openvidu_sample_app.lesson;
|
package io.openvidu.sample.app.lesson;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
import openvidu.openvidu_sample_app.user.User;
|
import io.openvidu.sample.app.user.User;
|
||||||
|
|
||||||
public interface LessonRepository extends JpaRepository<Lesson, Long> {
|
public interface LessonRepository extends JpaRepository<Lesson, Long> {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app.security;
|
package io.openvidu.sample.app.security;
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import openvidu.openvidu_sample_app.user.User;
|
import io.openvidu.sample.app.user.User;
|
||||||
import openvidu.openvidu_sample_app.user.UserComponent;
|
import io.openvidu.sample.app.user.UserComponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used to provide REST endpoints to logIn and logOut to the
|
* This class is used to provide REST endpoints to logIn and logOut to the
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app.security;
|
package io.openvidu.sample.app.security;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app.security;
|
package io.openvidu.sample.app.security;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -14,9 +14,9 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
||||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import openvidu.openvidu_sample_app.user.UserRepository;
|
import io.openvidu.sample.app.user.User;
|
||||||
import openvidu.openvidu_sample_app.user.UserComponent;
|
import io.openvidu.sample.app.user.UserComponent;
|
||||||
import openvidu.openvidu_sample_app.user.User;
|
import io.openvidu.sample.app.user.UserRepository;
|
||||||
/**
|
/**
|
||||||
* This class is used to check http credentials against database data. Also it
|
* This class is used to check http credentials against database data. Also it
|
||||||
* is responsible to set database user info into userComponent, a session scoped
|
* is responsible to set database user info into userComponent, a session scoped
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app.session_manager;
|
package io.openvidu.sample.app.session_manager;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -18,13 +18,12 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
import io.openvidu.java.client.OpenVidu;
|
import io.openvidu.java.client.OpenVidu;
|
||||||
import io.openvidu.java.client.Session;
|
import io.openvidu.java.client.Session;
|
||||||
import io.openvidu.java.client.TokenOptions;
|
import io.openvidu.java.client.TokenOptions;
|
||||||
|
import io.openvidu.sample.app.lesson.Lesson;
|
||||||
|
import io.openvidu.sample.app.lesson.LessonRepository;
|
||||||
|
import io.openvidu.sample.app.user.User;
|
||||||
|
import io.openvidu.sample.app.user.UserComponent;
|
||||||
import io.openvidu.java.client.OpenViduRole;
|
import io.openvidu.java.client.OpenViduRole;
|
||||||
|
|
||||||
import openvidu.openvidu_sample_app.lesson.Lesson;
|
|
||||||
import openvidu.openvidu_sample_app.lesson.LessonRepository;
|
|
||||||
import openvidu.openvidu_sample_app.user.User;
|
|
||||||
import openvidu.openvidu_sample_app.user.UserComponent;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api-sessions")
|
@RequestMapping("/api-sessions")
|
||||||
public class SessionController {
|
public class SessionController {
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app.user;
|
package io.openvidu.sample.app.user;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -18,7 +18,7 @@ import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
|
||||||
import openvidu.openvidu_sample_app.lesson.Lesson;
|
import io.openvidu.sample.app.lesson.Lesson;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
public class User {
|
public class User {
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app.user;
|
package io.openvidu.sample.app.user;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.context.annotation.ScopedProxyMode;
|
import org.springframework.context.annotation.ScopedProxyMode;
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app.user;
|
package io.openvidu.sample.app.user;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
|
@ -1,10 +1,10 @@
|
||||||
package openvidu.openvidu_sample_app.user;
|
package io.openvidu.sample.app.user;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
||||||
import org.springframework.data.jpa.repository.JpaRepository;
|
import org.springframework.data.jpa.repository.JpaRepository;
|
||||||
|
|
||||||
import openvidu.openvidu_sample_app.lesson.Lesson;
|
import io.openvidu.sample.app.lesson.Lesson;
|
||||||
|
|
||||||
public interface UserRepository extends JpaRepository<User, Long>{
|
public interface UserRepository extends JpaRepository<User, Long>{
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package openvidu.openvidu_sample_app;
|
package io.openvidu.sample.app.test;
|
||||||
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
Loading…
Reference in New Issue