The official blog of the Spring Java framework project, with release notes, security advisories, and announcements about Spring Boot and related tools.
HN links it for security notices like the Log4j2 and Spring RCE posts and licensing changes; commenters recommend Spring Boot for quick services.
Most people using e.g. spring boot or quarkus would end up using the defaults that come with those frameworks. For spring boot, the default is actually logback. However, you can switch it to log4j2. https://spring.io/blog/2021/12/10/log4j2-vulnerability-and-spring-boot
Log4j2 never quite got the same status that v1 had. V1 should be considered a bit obsolete at this point. It still works of course but it has some performance issues that both log4j2 and logback try to address.
The issue with high profile vulnerabilities like this is that there are a lot of projects where dependencies are rarely updated.
I update aggressively on my own projects to stay on top of changes and keep the effort related to mitigating compatibility issues at a minimum. A nice side effect is that you get all the latest security, performance, and other fixes. In my experience, updates get harder the further you fall behind. So, the longer you wait, the more likely you will have a lot of fallout from updates and the more likely it is that you will be exposed to pretty serious bugs that have since been addressed upstream.
If you are like me, I can recommend the excellent refreshVersions plugin for gradle. It makes staying on top of dependency updates a breeze. I run it every few weeks to spend a few minutes updating misc libraries, and verifying everything still works. Run the command, update to the suggested versions, create a pull request and merge when it works.
Occasionally there are issues with…
I've been developing Go web applications for the past 7+ years, some services getting billions of hits a day, and still have more than a handful running on various platforms currently.
In the past few days, I've been playing around with Kotlin because a client of mine is wanting an Android app developed, so I figure this is a good opportunity to dive right in. I have experience with Spring Java as well, not as the primary dev of the project, but I've written enough code to be comfortable with the process.
After being impressed with the process of writing Android apps in Kotlin, I decided to jump into Spring Boot + Kotlin and have been nothing but impressed. It's certainly different, but I'm feeling more productive than I was in Go because I can't say there is anything quite like it available in Go. I've tried Buffalo, but kept running into issues, and my typical go-to stack is Echo for the framework and Gorm for the MySQL library, but even then I need to pick my own tools for auth and caching.
The build time is certainly something to be desired, but with one of the more basic apps I'm writing for a client right now, it takes just a few seconds to compile, so it's certainly nothing to complain about at this point.
This is the tutorial I initially followed: https://spring.io/guides/tutorials/spring-boot-kotlin/ and swapping out the h2 database for mysql was pretty straightforward, and I was pleasantly surprised to see that I was able to have the app automatically set up…
it's funny i probably won't give that much actual tech advice here but will relate a little anecdote. I was once asking in a forum about moving from RoR to Clojure, trying to calm my nerves, and some Clojure dev straight up asked me "Out of curiosity.... why is it that a lot of web developers think that Clojure isn't an adequate solution for lightweight apps?" and I remember saying something like "Well.... I think because it's not like a full-fledged framework with built-in ORM and a prescribed workflow" etc. etc. and as I was saying it I had this epiphany -- a lot of the JVM guys are so used to figuring out tooling and library integration that while the rest of the world is looking in and saying "How do you start from scratch like that?" a lot of them are looking out and saying "How come you guys are trying to solve a variety of problems all using a single tool?". Code is code, and a lot of web programming is just accumulating strings.
So yeah I'd say I'm pretty early in my endeavors (I mean I code using a Java tool for a corporation but there is a pretty strict workflow for that) but as far as open source & my actual education is concerned, ok I'll give you tech advice --
short answer: https://spring.io/guides
1. Java has a number of MVC solutions. Pick one & study it, probably with a tutorial/guide. Don't focus on the amount of configuration available (the cruft), just follow a tutorial to get a few hello world kindof pages. You'll see that it's not nearly as difficult…
I understand where you come from but for me this is a huge drawback when I have to use Spring. I never know what to expect when working on a new spring project.
> beans defined in XML : we don't do that anymore
But you still can do that! Also you still can do DI with Autowired private fields instead of injecting via constructors. You can also create beans based on properties. You can also create beans automatically via a included JAR on your class path. On Spring Boot you can also have beans created based based on some conditional annotation. And now there's yet another new DSL [1] to create your beans programatically on startup time. Tracking down and debugging what's loaded in Spring is super hard compared to Guice for example.
Configuration is another piece of software that I have a really hard time to think why they do that. You can configure via a YAML file, AND via a properties file, AND overriding via environment variables, AND also with a configuration server that store your properties on a separated server, and they are all mixed together in a weird single configuration entry for the specific environment that you have. Probably this made sense some 10 years ago when we loved J2EE but why support this kind of madness nowadays?
What I feel Spring is missing so much is forgetting about all the past and where the framework came from, start from scratch with simple premises around reactor-netty [2], only supporting the functional DSL, no crazy class path scanning, no…
First of all, I don't think there is anything out there that could beat Java + IntelliJ + Spring boot.
It does not matter if you use WebStorm, Clion, Rider ?, one must admit that IntelliJ is a Java IDE at its heart.
It's very hard to describe how amazing the tooling is because you cannot describe a color to blind people.
This is not meant to be offensive.
There is one way I could at least try it.
If you are using Vim/Emacs and everything feels like 'flying', that feeling multiplied by 3.
That's what IntelliJ + Java is.
If you then also install the Vim plugin, you got the best of both worlds.
I did asp.net mvc with C# and VS, it's not even close.
I did Rails a few years, not comparable ...
I tried to so many languages and frameworks, nothing comes even close to IntelliJ+Java+Spring boot.
Since I'm already procrastinating, I'd like to kill a few myths about Java and web development in Java.
1. OMG XML.
I cannot remember the last time I had to dive into XML.
2. I can hit refresh and instantly see changes, can you do that in Java?
Yes, every modern web framework has hot-reload, you don't wait, you just save and hit the browser reload button.
It almost feels like a scripting language.
3. How about ORM's and DB access in general ?
We got the mother of all ORM's, hibernate but if don't like ORM's there are great alternatives.
Jooq[0], which feels almost like SQL:
create.selectFrom(BOOK)
.where(BOOK.PUBLISHED_IN.eq(2011))
.orderBy(BOOK.TITLE)
There is…
> For the most part, Eclipse has fallen into obscurity.
I guess it depends on the locale/company/environment?
In most conferences, online videos, as well as among the people I know personally, JetBrains IDEs (IntelliJ IDEA for Java) seem to reign supreme: https://www.jetbrains.com/idea/ They have a community version, personally I pay for the Ultimate package of all the tools. They're slightly sluggish, want a lot of RAM, but the actual development experience and features make up for that. Hands down, the best set of IDEs that I've used from a pure development perspective - refactoring enterprise codebases mostly becomes something you can actually do with confidence. Running tests is easy. Integrating with app servers, containers, package managers or container runtimes is easy. Even remote debugging is easy to set up, as is doing debugging, or even testing web APIs. I'd say that all of the features that should exist do exist, which is more than I can say about many other IDEs.
I know that Eclipse is sometimes used more in an educational setting, however there are also both some specialized tools, as well as customized versions for something like working with Spring in the industry: https://spring.io/tools In my experience, the idea behind the IDE is nice (a platform that you can install whatever you want on, entire language support packages, or specialized tool packages), but the execution falls short - sometimes it's unstable, other times it works slow and so on. That…