[DEV] correct json serialization
This commit is contained in:
parent
0ea9895024
commit
fd6de65759
@ -22,7 +22,7 @@
|
||||
<dependency>
|
||||
<groupId>kangaroo-and-rabbit</groupId>
|
||||
<artifactId>archidata</artifactId>
|
||||
<version>0.1.3</version>
|
||||
<version>0.3.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
@ -21,6 +21,10 @@ import org.kar.archidata.GlobalConfiguration;
|
||||
import org.kar.archidata.SqlWrapper;
|
||||
import org.kar.archidata.UpdateJwtPublicKey;
|
||||
import org.kar.archidata.api.DataResource;
|
||||
import org.kar.archidata.catcher.ExceptionCatcher;
|
||||
import org.kar.archidata.catcher.FailExceptionCatcher;
|
||||
import org.kar.archidata.catcher.InputExceptionCatcher;
|
||||
import org.kar.archidata.catcher.SystemExceptionCatcher;
|
||||
import org.kar.archidata.filter.AuthenticationFilter;
|
||||
import org.kar.archidata.filter.CORSFilter;
|
||||
import org.kar.archidata.filter.OptionFilter;
|
||||
@ -66,6 +70,11 @@ public class WebLauncher {
|
||||
rc.register(new CORSFilter());
|
||||
// global authentication system
|
||||
rc.registerClasses(AuthenticationFilter.class);
|
||||
// register exception catcher
|
||||
rc.register(InputExceptionCatcher.class);
|
||||
rc.register(SystemExceptionCatcher.class);
|
||||
rc.register(FailExceptionCatcher.class);
|
||||
rc.register(ExceptionCatcher.class);
|
||||
// add default resource:
|
||||
rc.registerClasses(UserResource.class);
|
||||
rc.registerClasses(AlbumResource.class);
|
||||
|
@ -12,17 +12,15 @@ CREATE TABLE `node` (
|
||||
) AUTO_INCREMENT=10;
|
||||
*/
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.kar.archidata.annotation.SQLIfNotExists;
|
||||
import org.kar.archidata.annotation.SQLTableName;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
@SQLTableName ("album")
|
||||
@SQLIfNotExists
|
||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Album extends NodeSmall {
|
||||
public Date publication = null;
|
||||
}
|
||||
|
@ -17,13 +17,13 @@ import org.kar.archidata.annotation.SQLIfNotExists;
|
||||
import org.kar.archidata.annotation.SQLLimitSize;
|
||||
import org.kar.archidata.annotation.SQLTableName;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import java.sql.Date;
|
||||
|
||||
@SQLTableName ("artist")
|
||||
@SQLIfNotExists
|
||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Artist extends NodeSmall {
|
||||
@SQLLimitSize(256)
|
||||
public String firstName = null;
|
||||
|
@ -12,16 +12,14 @@ CREATE TABLE `node` (
|
||||
) AUTO_INCREMENT=10;
|
||||
*/
|
||||
|
||||
import java.sql.ResultSet;
|
||||
|
||||
import org.kar.archidata.annotation.SQLIfNotExists;
|
||||
import org.kar.archidata.annotation.SQLTableName;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
@SQLTableName ("gender")
|
||||
@SQLIfNotExists
|
||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Gender extends NodeSmall {
|
||||
|
||||
}
|
||||
|
@ -19,10 +19,10 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
|
||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class MediaSmall {
|
||||
public class MediaStreamProperty {
|
||||
public Long id;
|
||||
|
@ -18,6 +18,9 @@ import org.kar.archidata.annotation.SQLLimitSize;
|
||||
import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
||||
import org.kar.archidata.model.GenericTable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class NodeSmall extends GenericTable {
|
||||
@SQLLimitSize(256)
|
||||
public String name = null;
|
||||
|
@ -18,11 +18,11 @@ import org.kar.archidata.annotation.SQLIfNotExists;
|
||||
import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
||||
import org.kar.archidata.annotation.SQLTableName;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
@SQLTableName ("playlist")
|
||||
@SQLIfNotExists
|
||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Playlist extends NodeSmall {
|
||||
@SQLTableLinkGeneric
|
||||
public List<Long> tracks = null;
|
||||
|
@ -18,11 +18,11 @@ import org.kar.archidata.annotation.SQLIfNotExists;
|
||||
import org.kar.archidata.annotation.SQLTableLinkGeneric;
|
||||
import org.kar.archidata.annotation.SQLTableName;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
@SQLTableName ("track")
|
||||
@SQLIfNotExists
|
||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Track extends NodeSmall {
|
||||
public Long genderId = null;
|
||||
public Long albumId = null;
|
||||
|
@ -4,11 +4,11 @@ import org.kar.archidata.annotation.SQLIfNotExists;
|
||||
import org.kar.archidata.annotation.SQLTableName;
|
||||
import org.kar.archidata.model.User;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
@SQLTableName ("user")
|
||||
@SQLIfNotExists
|
||||
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class UserKarusic extends User {
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="generic-page">
|
||||
<div class="title">
|
||||
Karideo Settings
|
||||
Karusic Settings
|
||||
</div>
|
||||
<div class="fill-all colomn_mutiple">
|
||||
Global settings.
|
||||
|
@ -7,6 +7,8 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ArianeService } from 'app/service';
|
||||
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-settings',
|
||||
templateUrl: './settings.html',
|
||||
@ -19,7 +21,6 @@ export class SettingsScene implements OnInit {
|
||||
private arianeService: ArianeService) {
|
||||
// nothing to do.
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
console.error(`MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`);
|
||||
console.error(`get parameter update: ${this.page}`);
|
||||
|
Loading…
Reference in New Issue
Block a user