I am trying to know how to integrate spring boot with kotlin project. I am refering to this link:
https://spring.io/guides/tutorials/spring-boot-kotlin/
however, it demands using the following link
https://start.spring.io/#!language=kotlin&type=gradle-project
to integrate kotlin and gradle
and this link:
https://docs.spring.io/initializr/docs/current/reference/htmlsingle/#command-line
to Initializr HTTP API
however the last link is not working and actually it is not clear why i should use it.
the question is, how can i use such link as it is down, is there any alternative??
The best way to do this is entering https://start.spring.io/ and selecting the needs of your project.
If you already know Spring, it's a very good way to start. And don't need gradle to run, this can be done with maven too.
Related
I have been trying to set up a Spring Web application to use Azure Active Directory.
All the samples that I have found online are based on Spring Boot, is there a simple example that shows setting up spring framework web app only without using Spring Boot?
I am having no luck finding stuff, I am also trying to figure out how to convert all the spring boot autoconfig. Surely there is a sample somewhere that makes it easy to use for a Spring Framework only web-app?
I was able to figure this out somewhat. I'm very new to OAuth so still trying to learn as I go.
Basically I followed the Spring Reference and got things working using the override auto-configuration sections at https://docs.spring.io/spring-security/reference/servlet/oauth2/index.html
It also helped that I updated the Spring Framework versions to the latest and made sure I used the correct dependencies according to that reference site
I have started learning about spring and in every tutorial they start from spring initializr, i was wondering is it necessary to use it or we can create a project without using spring initializr ?
No, it is no necessary. You can do everything by your own hands. It just helps you to start quicker so that you focus more on the Spring concepts instead of spending much time on "infrastructure" like configuring dependencies. You run it and it just works. Then you can extend it step by step. This can be especially helpful if you just start learning Spring. Later on you should of course spend some time on other aspects that initializr provides you.
Adding to whatever is already mentioned.
No , it is not necessary to create a project with Spring Initializr
The site provides a curated list of dependencies that you can add to
your application based on the selected Spring Boot version. You can
also choose the language, build system and JVM version for the
project.
https://spring.io/blog/2019/02/20/what-s-new-with-spring-initializr.
https://github.com/spring-io/initializr/
Using Spring Initializr the right dependencies are preconfigured for the Spring Boot version used. These preconfigured projects reduces the setup time and one can start implementing the code rather than investing time on which dependencies to go with.
I want to use "feign" dependency in my spring boot project, Is there any source like https://mvnrepository.com/ to get dependency?
You can use spring initializer. https://start.spring.io/. I would suggest you to always use one version lower than the latest version of snapshot. Cause newer version might not be that standard.
You may use spring initializer i.e https://start.spring.io/. Go to the site and fill in all the details.Select the dependency you want(in your case feign). Select generate. It will generate a zip file with your starter project. Import it and you can start coding.You can see a picture demonstrating the same in this link The spring initializer
Alternatively you can do the same using Spring tool suite. You can download STS here Spring Tool Suite.
->Install and open spring tool suite.
->Click File>>New and select spring starter project. If u don't get the option there, choose other and then search for spring starter project.
->After choosing spring starter project, fill in all the necessary details and click next.
->In the next section choose all the dependencies you require(in your case feign).
->click finish and you are good to go.
Happy Coding.
I found that,we can search search same in https://mvnrepository.com/ with spring suffix
Ex: feign spring
I have previous experience in Spring MVC but I am new to Spring Boot.
I am Using IntelliJ for the first time.
What I noticed is that when you create a Spring boot project with security dependencies added during the time of creation, Then the IDE creates the project already configured With Basic Authentication whereas if I add dependencies to pom.xml after creation, then the application won't get configured with basic authentication automatically.
Can anyone explain this behavior of IntelliJ and can anyone help me with steps for configuring the pre-created project with Basic Authentication?
IntelliJ is using
https://start.spring.io/
to initialise your project. After the project is initialised, the IDE doesn't modify your code in any way. That is the normal behaviour and it is not Spring Boot related.
NOTE: The dependency that you add in your pom.xml is just pulling down that dependency, but if you need to use it you do the code yourself. (More information about Maven: https://en.wikipedia.org/wiki/Apache_Maven)
Is it possible to integrate activiti explorer maven plugin with activiti Spring boot app?, so that we can make use of activit-explorer to view deployed process in activit-spring boot engine.
I know we can use rest-api over spring boot to query process engine, but I want to know if it is possible to run the explorer over spring boot by adding it as a maven plugin during deployment?Or can we tweak the activit-explorer.war somehow to point to spring-boot activiti engine?
activiti-explorer.war is standalone webapp by itself. I've write some guideline on how to manually to embed activiti-explorer to you own app. http://blog.canang.com.my/2016/05/12/embedding-activiti-explorer-to-your-application/
Most probably step 5 in my blog is your solution.
btw, there's reason why the name is 'default'. I can't recall it atm
I thought of answering my own question so that it will be useful for other developers with similar requirement. If you want to make an eco-system where activiti-rest, explorer and your custom end points co-exist, please refer this thread from activit forum. I have tried this and is working fine. link to thread
I would like to give my observation here. In order to avoid getting into pulling source and trying to build myself, I achieved partial success, by installing the activit-explorer as part of the usual standalone installation.Started the standalone activiti-explorer using Apache-Tomcat but I configured the database for Activiti as same as (MYSQL in my case) I used in my spring-boot application to hit the common ground.
But apparently the activiti version in my spring boot app was 5.19.0.0 and that for activiti-explorer was 5.22.0.0, which created some misalignment for spring boot application startup to fail. I am hopeful that with matching versions it might succeed. When I get some more time on me I will try and update. Since then may be someone can use this route.