Skip to content
This repository was archived by the owner on Aug 4, 2025. It is now read-only.

Kotlin archetypes: component, spring-mvc#14

Open
elfrucool wants to merge 10 commits intoopentable:masterfrom
elfrucool:gserrano-kotlin
Open

Kotlin archetypes: component, spring-mvc#14
elfrucool wants to merge 10 commits intoopentable:masterfrom
elfrucool:gserrano-kotlin

Conversation

@elfrucool
Copy link

@elfrucool elfrucool commented Oct 15, 2020

Here I'm presenting a couple of new archetypes:

  • spring-archetype-component-kotlin to create spring based components in kotlin, and
  • spring-archetype-service-mvc-kotlin to create spring-mvc services in kotlin

Both were already tested on my local environment.

Also I'm using JUnit5 on Kotlin tests

Let me know if it's ok to have them, I had this idea after reading that we are open to use kotlin if the concrete team and manager agrees.

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<addDefaultExcludes>false</addDefaultExcludes>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for adding .gitignore to generated projects

* You'll probably want to do something more than
* store a String.
*/
public class ComponentJava {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some java code to show Java and Kotlin can live together

## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
#set( $D = '\$' )
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to escape it since $ has special meaning on Kotling strings

properties = ["ot.component.config=foo"],
classes = [ComponentKotlinConfiguration::class]
)
// must be @Autowired not @Inject
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for having componentKotlin: ComponentKotlin as immutable field (and constructor argument) we need to use @Autowired and JUnit5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants