« first day (3850 days earlier)      last day (1074 days later) » 

12:00 AM
RADIO SHACK LEVEL II BASIC READY >_ (source)
 
 
5 hours later…
4:51 AM
fights crime
 
 
5 hours later…
9:29 AM
I have a outline of a project with java spring boot for a rest api
I have a com.self.project in src/main/java and a folder controller in com.self.project
where should i put another project into this folder system in order to serve it as an api
 
 
1 hour later…
10:51 AM
ignore that now ^^^
when i do submit this localhost:8080/submit_buy_trade?size=10&limit=100, it says This application has no explicit mapping for /error, so you are seeing this as a fallback.
but i do have a mapping?
 
 
2 hours later…
 
2 hours later…
2:44 PM
4 messages moved to Trash can
@compLearner Please don't post homework questions here.
 
3:14 PM
when i test my api using postman i get error 405 method not allowed for all my posts and gets
the problem is that there are no error messages beyond this so I have no idea what to do
Im not sure my controller is being picked up, but I have check that is in a folder deeper than from where the main() application is called
 
3:32 PM
so it looks like i have nullpointerexception on all the methods in my controller
 
3:42 PM
I got 99 errors, but an NPE ain't one.
 
ah haha
 
Hey, I'm writing Java for almost the first time.
 
@XRFXLP Welcome to the Java Chat, the room for Java enthusiasts! I'm Oak, one of the room's bots. If you want to ask a question, just ask it and someone will respond if they feel like it. But remember that this room is not a help desk or tutoring service! If you want to just hang out, then welcome aboard! Oh, and the room's full list of rules are posted here.
 
I've a matrices of int,say mat how can I convert it to a stream?
mat.stream() doesn't works.
 
 
1 hour later…
4:57 PM
how does you matrix look like?
 
i have a treemap which I would like to convert to a json object, is there an easy java way to do this?
 
soup
@Trajan what does ObjectMapper (jackson) make of it?
anyway...
@Squirrelkiller do you really want to compile only a single .java file or do you want to compile a project?
in the first case... why?!
in the second case, just use maven
I actually know the maven cli...
you just do...
mvn ... something ... I guess...
but clicking in the IDE is much easier :D
 
Because it's a file with example stuff I solved for our...practical examination? Sounds too much like doctors office, but basically we have to demonstrate what we learned in the lecture. So it's a single file with some functions and a main.
CI/CD has no clickable elements
 
examples in CI/CD ... hmm....
 
5:10 PM
So now I got the class file, but the classloader complains
 
I would still make a project
have multiple files with a main entry point is possible in Java
you can run your compiled program and specify which entry point you want to use
generally speaking, we dont compile single files...
but generally speaking, we also write small files...
 
Does having an iml file mean I have a project ready? Because I guess I'd totally prefer that way.
 
@Wietlol seems good right now
 
I would consider a maven project
.iml is IDEA specific iirc
although I havent used the option in ages, I suppose that you could let IntelliJ create the maven project
for my own stuff, I have my own project templates, so I dont create them using the projct wizard any more
 
6:15 PM
I needed to share book around my java project, the controller in another subfolder uses to do methods on it. Why did it have to be static and is this the best way of structuring my project?
 
why do you need to share a book?
I would recommend using a stateless server so you dont have a session or anything like that on your server side
the request should tell which book it is about
and then load that book from the database or something
 
all my restful endpoints are methods on the book @Wietlol
 
but if you send a request and I send a request, do we use the same book?
 
6:30 PM
yes
essentially its a java backend/rest api to perform actions on a book
(not sure whether the number of users matters at this point)
 
you could use a singleton bean baeldung.com/spring-bean-scopes
but I still think you will probably later on realize that you dont want a singleton
 
no its definitely a singleton
 
there will always be one book?
 
yes
the app is to serve this book
 
can you list all mutating actions that I can perform?
 
6:33 PM
its an exchange
 
still
how do you handle concurrency?
 
i dont yet haha
 
if you have mutating singletons, you are bound to have concurrency issues
it is much better to have immutable data classes and handle your operations on the database
 
i have no db haha
 
at which point, there is no use in sharing books any more
so, if the application restarts, you have lost the exchange?
 
6:35 PM
yes this isnt a commercial project
 
 
2 hours later…
8:09 PM
@NathanWilliamson Welcome to the Java Chat, the room for Java enthusiasts! I'm Oak, one of the room's bots. If you want to ask a question, just ask it and someone will respond if they feel like it. But remember that this room is not a help desk or tutoring service! If you want to just hang out, then welcome aboard! Oh, and the room's full list of rules are posted here.
 
9:02 PM
> I need help cheating on the AP exam and on my homework.
hmm...
I suppose you will also need help cheating at the office...
better to just pass the exam on your own skills
 
Zoe
9:26 PM
1 message moved to Trash can
bleh, should've kicked before I moved
dumb chat mechanics at work :rolling_eyes:
 

« first day (3850 days earlier)      last day (1074 days later) »