Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jh-boot
Project
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
Jan Hrabal
jh-boot
Commits
b6244184
Commit
b6244184
authored
Oct 03, 2019
by
Jan Hrabal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
errors
parent
c9746623
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
151 additions
and
145 deletions
+151
-145
AppUser.java
src/main/java/com/jh/boot/security/model/AppUser.java
+3
-0
ErrorMessage.java
src/main/java/com/jh/boot/web/error/ErrorMessage.java
+148
-145
No files found.
src/main/java/com/jh/boot/security/model/AppUser.java
View file @
b6244184
...
@@ -12,6 +12,8 @@ import java.util.stream.Collectors;
...
@@ -12,6 +12,8 @@ import java.util.stream.Collectors;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Inheritance
;
import
javax.persistence.InheritanceType
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.JoinTable
;
import
javax.persistence.JoinTable
;
import
javax.persistence.ManyToMany
;
import
javax.persistence.ManyToMany
;
...
@@ -31,6 +33,7 @@ import com.jh.boot.jpa.AbstractIdEntity;
...
@@ -31,6 +33,7 @@ import com.jh.boot.jpa.AbstractIdEntity;
*/
*/
@Entity
@Entity
@Table
(
name
=
"APP_USER"
)
@Table
(
name
=
"APP_USER"
)
@Inheritance
(
strategy
=
InheritanceType
.
JOINED
)
public
class
AppUser
extends
AbstractIdEntity
{
public
class
AppUser
extends
AbstractIdEntity
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
...
src/main/java/com/jh/boot/web/error/ErrorMessage.java
View file @
b6244184
package
com
.
jh
.
boot
.
web
.
error
;
package
com
.
jh
.
boot
.
web
.
error
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
/**
/**
* The Class ErrorMessage.
* The Class ErrorMessage.
*/
*/
public
class
ErrorMessage
{
public
class
ErrorMessage
{
/** The field. */
public
static
final
String
CODE_VALUE_REQUIRED
=
"VALUE_REQUIRED"
;
private
String
field
;
/** The field. */
/** The code. */
private
String
field
;
private
String
code
;
/** The code. */
/** The message. */
private
String
code
;
@JsonProperty
(
"msg"
)
private
String
message
;
/** The message. */
@JsonProperty
(
"msg"
)
private
String
message
;
/**
* Instantiates a new error message.
*/
/**
private
ErrorMessage
()
{
* Instantiates a new error message.
}
*/
private
ErrorMessage
()
{
}
/* builder methods */
/**
/* builder methods */
* Constructs error message with field, code and message .
*
/**
* @param field the field
* Constructs error message with field, code and message .
* @param code the code
*
* @param message the message
* @param field the field
* @return the error message
* @param code the code
*/
* @param message the message
public
static
ErrorMessage
withFieldCodeMessage
(
String
field
,
String
code
,
String
message
)
{
* @return the error message
ErrorMessage
em
=
new
ErrorMessage
();
*/
em
.
field
=
field
;
public
static
ErrorMessage
withFieldCodeMessage
(
String
field
,
String
code
,
String
message
)
{
em
.
code
=
code
;
ErrorMessage
em
=
new
ErrorMessage
();
em
.
message
=
message
;
em
.
field
=
field
;
return
em
;
em
.
code
=
code
;
}
em
.
message
=
message
;
return
em
;
}
/**
* Constructs error message with field, code and message .
*
/**
* @param field the field
* Constructs error message with field, code and message .
* @param message the message
*
* @return the error message
* @param field the field
*/
* @param message the message
public
static
ErrorMessage
withFieldMessage
(
String
field
,
String
message
)
{
* @return the error message
ErrorMessage
em
=
new
ErrorMessage
();
*/
em
.
field
=
field
;
public
static
ErrorMessage
withFieldMessage
(
String
field
,
String
message
)
{
em
.
message
=
message
;
ErrorMessage
em
=
new
ErrorMessage
();
return
em
;
em
.
field
=
field
;
}
em
.
message
=
message
;
return
em
;
}
/**
* Constructs error message with field and code .
*
/**
* @param field the field
* Constructs error message with field and code .
* @param code the code
*
* @return the error message
* @param field the field
*/
* @param code the code
public
static
ErrorMessage
withFieldCode
(
String
field
,
String
code
)
{
* @return the error message
ErrorMessage
em
=
new
ErrorMessage
();
*/
em
.
field
=
field
;
public
static
ErrorMessage
withFieldCode
(
String
field
,
String
code
)
{
em
.
code
=
code
;
ErrorMessage
em
=
new
ErrorMessage
();
return
em
;
em
.
field
=
field
;
}
em
.
code
=
code
;
return
em
;
}
/**
* Constructs error message with code and message .
*
/**
* @param code the code
* Constructs error message with code and message .
* @param message the message
*
* @return the error message
* @param code the code
*/
* @param message the message
public
static
ErrorMessage
withCodeMessage
(
String
code
,
String
message
)
{
* @return the error message
ErrorMessage
em
=
new
ErrorMessage
();
*/
em
.
code
=
code
;
public
static
ErrorMessage
withCodeMessage
(
String
code
,
String
message
)
{
em
.
message
=
message
;
ErrorMessage
em
=
new
ErrorMessage
();
return
em
;
em
.
code
=
code
;
}
em
.
message
=
message
;
return
em
;
}
/**
* With message.
*
/**
* @param message the message
* With message.
* @return the error message
*
*/
* @param message the message
public
static
ErrorMessage
withMessage
(
String
message
)
{
* @return the error message
ErrorMessage
em
=
new
ErrorMessage
();
*/
em
.
message
=
message
;
public
static
ErrorMessage
withMessage
(
String
message
)
{
return
em
;
ErrorMessage
em
=
new
ErrorMessage
();
}
em
.
message
=
message
;
return
em
;
}
/**
* With code.
*
/**
* @param code the code
* With code.
* @return the error message
*
*/
* @param code the code
public
static
ErrorMessage
withCode
(
String
code
)
{
* @return the error message
ErrorMessage
em
=
new
ErrorMessage
();
*/
em
.
code
=
code
;
public
static
ErrorMessage
withCode
(
String
code
)
{
return
em
;
ErrorMessage
em
=
new
ErrorMessage
();
}
em
.
code
=
code
;
return
em
;
}
/* getters */
/**
/* getters */
* Gets the field.
*
/**
* @return the field
* Gets the field.
*/
*
public
String
getField
()
{
* @return the field
return
field
;
*/
}
public
String
getField
()
{
return
field
;
/**
}
* Gets the code.
*
/**
* @return the code
* Gets the code.
*/
*
public
String
getCode
()
{
* @return the code
return
code
;
*/
}
public
String
getCode
()
{
return
code
;
/**
}
* Gets the message.
*
/**
* @return the message
* Gets the message.
*/
*
public
String
getMessage
()
{
* @return the message
return
message
;
*/
}
public
String
getMessage
()
{
return
message
;
}
}
}
\ No newline at end of file
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