Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Hao-Hsiang Song
/
topics-auction
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4d88a3a3
authored
Nov 20, 2018
by
Hao-Hsiang Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed notnull, cors
parent
7b8ade8c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
src/main/java/edu/uchicago/mpcs/topics/Application.java
src/main/java/edu/uchicago/mpcs/topics/auction/Bid.java
src/main/java/edu/uchicago/mpcs/topics/controller/UserController.java
src/main/java/edu/uchicago/mpcs/topics/Application.java
View file @
4d88a3a3
...
...
@@ -58,7 +58,9 @@ public class Application {
return
new
WebMvcConfigurer
()
{
@Override
public
void
addCorsMappings
(
CorsRegistry
registry
)
{
registry
.
addMapping
(
"/**"
).
allowedOrigins
(
"http://localhost:3000"
);
registry
.
addMapping
(
"/**"
)
.
allowedOrigins
(
"http://localhost:3000"
)
.
allowedMethods
(
"GET"
,
"POST"
,
"PUT"
,
"DELETE"
);
}
};
}
...
...
src/main/java/edu/uchicago/mpcs/topics/auction/Bid.java
View file @
4d88a3a3
...
...
@@ -4,7 +4,7 @@ import javax.persistence.Entity;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.validation.constraints.Not
Blank
;
import
javax.validation.constraints.Not
Null
;
import
java.util.Date
;
@Entity
...
...
@@ -14,7 +14,7 @@ public class Bid
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
private
Long
bidId
;
@Not
Blank
@Not
Null
private
Long
userId
;
private
Long
amount
;
private
String
itemId
;
...
...
src/main/java/edu/uchicago/mpcs/topics/controller/UserController.java
View file @
4d88a3a3
package
edu
.
uchicago
.
mpcs
.
topics
.
controller
;
import
edu.uchicago.mpcs.topics.auction.Item
;
import
edu.uchicago.mpcs.topics.service.ItemService
;
import
edu.uchicago.mpcs.topics.service.UserService
;
import
edu.uchicago.mpcs.topics.user.User
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -14,7 +12,7 @@ import java.util.List;
*/
@RestController
@RequestMapping
(
"/
item
"
)
@RequestMapping
(
"/
user
"
)
public
class
UserController
{
@Autowired
...
...
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