Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
trismegisto-mongo-api
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Denys Tito Urbano
trismegisto-mongo-api
Commits
b663908b
Commit
b663908b
authored
Oct 26, 2022
by
Denys Tito Urbano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CREATE] Configuración de API agregada
parent
0d21a8c6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
ApplicationConfig.java
...oliveros/trismegisto/mongo/api/api/ApplicationConfig.java
+31
-0
No files found.
src/main/java/pe/edu/sacooliveros/trismegisto/mongo/api/api/ApplicationConfig.java
0 → 100644
View file @
b663908b
package
pe
.
edu
.
sacooliveros
.
trismegisto
.
mongo
.
api
.
api
;
import
java.util.HashSet
;
import
java.util.Set
;
import
javax.ws.rs.core.Application
;
import
org.jboss.resteasy.plugins.interceptors.CorsFilter
;
@javax
.
ws
.
rs
.
ApplicationPath
(
"/api/v1"
)
public
class
ApplicationConfig
extends
Application
{
private
final
Set
<
Object
>
singletons
=
new
HashSet
<>();
private
final
HashSet
<
Class
<?>>
classes
=
new
HashSet
<>();
public
ApplicationConfig
()
{
CorsFilter
corsFilter
=
new
CorsFilter
();
corsFilter
.
getAllowedOrigins
().
add
(
"*"
);
corsFilter
.
setAllowedMethods
(
"OPTIONS, GET, POST, DELETE, PUT, PATCH"
);
singletons
.
add
(
corsFilter
);
}
@Override
public
Set
<
Object
>
getSingletons
()
{
return
singletons
;
}
@Override
public
HashSet
<
Class
<?>>
getClasses
()
{
return
classes
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment