Alex
Alex
Explore posts from servers
CC#
Created by Alex on 10/30/2024 in #help
Upload file with swagger ui crash
I found the problem and it actually was a browser Brave. I don't know why exactly it crashes my app, but I switched to other and it's working fine now
13 replies
CC#
Created by Alex on 10/30/2024 in #help
Upload file with swagger ui crash
Do you upload with swagger? The endpoint is totally fine and works if I upload file with the postman. The problem is that it doesn't even hit this endpoint (I guess). Nullable if because the file might not be sent with the request
13 replies
CC#
Created by Alex on 10/30/2024 in #help
Upload file with swagger ui crash
The application crashes right after I click "open" or "cancel" button on the file selection window. The endpoint works fine if I send file with Postman. I'm curious if anybody encountered this problem in swagger ui before and knows how to solve it
13 replies
CC#
Created by Alex on 10/29/2024 in #help
Service layer exception or bool/error object
thank you for the answer
4 replies
JCHJava Community | Help. Code. Learn.
Created by Alex on 9/30/2024 in #java-help
jpa and postgresql
entity
package org.example.demo.domain.entity;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "companies")
public class Company implements EntityBase<Integer> {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@Column(nullable = false, unique = true)
private String name;

// @Builder.Default
// @ElementCollection
// @CollectionTable(name = "company_locales", joinColumns = @JoinColumn(name = "company_id"))
// @MapKeyColumn(name = "lang")
// @Column(name = "description")
// private Map<String,String> locales = new HashMap<>();
}
package org.example.demo.domain.entity;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "companies")
public class Company implements EntityBase<Integer> {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;

@Column(nullable = false, unique = true)
private String name;

// @Builder.Default
// @ElementCollection
// @CollectionTable(name = "company_locales", joinColumns = @JoinColumn(name = "company_id"))
// @MapKeyColumn(name = "lang")
// @Column(name = "description")
// private Map<String,String> locales = new HashMap<>();
}
import java.io.Serializable;


public interface EntityBase<T extends Serializable> {
public void setId(T id);
public T getId();
}
import java.io.Serializable;


public interface EntityBase<T extends Serializable> {
public void setId(T id);
public T getId();
}
5 replies
CC#
Created by Alex on 9/19/2024 in #help
help me find correct response model
I'll try it, thanks
3 replies
CC#
Created by Alex on 8/16/2024 in #help
How to start test inside docker container from app?
No description
38 replies
CC#
Created by Alex on 8/16/2024 in #help
How to start test inside docker container from app?
Thanks for the detailed answer, I'll look into this project. I don’t yet have a specific plan for how this will work, I’m developing ideas, but the main concept is that I create unit tests in advance for each task (maybe a separate project with tests) and run it somewhere and send back the results to the user
38 replies
CC#
Created by Alex on 8/16/2024 in #help
How to start test inside docker container from app?
thank you, but I don't know how to start it from the app. Should I use Proccess?
38 replies
CC#
Created by Alex on 7/25/2024 in #help
✅ e-commerce app
Okay, I understand, thank you
21 replies
CC#
Created by Alex on 7/25/2024 in #help
✅ e-commerce app
Because nopCommerce concept is to create product variations (color red, size l), (color green, size xl)
21 replies
CC#
Created by Alex on 7/25/2024 in #help
✅ e-commerce app
So I add (color,red), (color,blue), (color, green) to the attribute list?
21 replies
CC#
Created by Alex on 7/25/2024 in #help
✅ e-commerce app
Yes, but I need dynamic attributes, I know that it can be done by creating tables attributes(name) attribute_options (attr id, value) and product variant(product id, attribute options). but i don't understand it all would work , should I create all variants of products and store them in database, and how can I display product data on the product page, if I have 3 color * 3 size = 9 products to fetch
21 replies
CC#
Created by Alex on 7/25/2024 in #help
✅ e-commerce app
product can have attributes like color, size (I want to add then dynamically) and options (color: red, green, blue, size l, m, xl) and product can have a category, for example category clothes -> summer -> products
21 replies
CC#
Created by Alex on 7/12/2024 in #help
✅ Web API format for error response
I'm responding to the user, I want him to know why the status of the response is 404, or why his form submission failed, what data he must change
4 replies
CC#
Created by Alex on 7/2/2024 in #help
Recommend book/source
thank you for the answers
8 replies
CC#
Created by Alex on 6/28/2024 in #help
✅ Refresh Token + JWT + Identity
That's great that it providers solution out of the box, but I want to write my own endpoint to understand how it works and how it can be implemented with Identity
6 replies
CC#
Created by Alex on 6/28/2024 in #help
✅ Refresh Token + JWT + Identity
.
6 replies
CC#
Created by Alex on 6/25/2024 in #help
✅ How to get Options from DI
Thank you for the answers
14 replies
CC#
Created by Alex on 6/25/2024 in #help
✅ How to get Options from DI
My question is how can I get options that I configured above exactly in .AddGoogle()?
14 replies